Forum > Beginners

How to revert my mess (repository)

(1/3) > >>

Nicole:
I am new in Lazarus and old in Delphi.
In Delphi I used to save every important step as "my_pas_sic.pas".
The dfm was saved by the machine. I save the file back to the original name and had my revert point called _sic (for 'Sicherung').
Very slim solution, a handful of KB. A few seconds of work.

This does not work in Lazarus that way.

What would you recommend me as backup for snapshots and backup for source?
I would like to:
1) Generate snapshots to revert if I brought myself into a dead end once again? - for work in progress
2) Which files shall I include in backups? lpr, pas, lfd..... is there a list anywhere? - for finished coded projects

It shall remain as slim as possible.
Thanks.

af0815:
In short: think about git

It is meaningless if you use Lazarus , Delphi, Visual Studio or .... Only a sourcecode managment give you the tools to have control about your code. And you didnt need your own server, for the first steps. Or you use one of the popular (free) Hoster like GITHub or GITLab. There you can have privat repositories for free (read the rulez)

Thaddy:
And short-term mess can be resolved with crtl-z , meaning typos or errors in your session. Goes quite deep... more that 10 edits.
(BTW for individual programmers it is better to - imho - still use svn instead of git)

Martin_fr:
1) Lazarus does save copies to a backup folder, and you can configure that. You can set it to keep the last 500 "saves" of each file.
However, that includes when the file gets saved for compilation.

It's gonna be a mess though to find the correct one...

2) Saving and restoring copies.
Not sure what you mean "it doesn't work" => well you probably can't do "Menu: File > Save as". But you can copy files in your filesystem/explorer.

3) local version of git. (no server needed / though nice as backup)
On Windows with tortoise git, that is really easy.
Just do a commit every time you made a change.
Later rebase them, and squash them.

PascalDragon:

--- Quote from: Thaddy on July 12, 2022, 08:53:04 pm ---(BTW for individual programmers it is better to - imho - still use svn instead of git)

--- End quote ---

Git does not require a server, SVN does. For simple usage there isn't otherwise that much difference between the two, but if one needs a bit more (e.g. cleaning up the history) Git has you covered already. I personally see no reason to recommend SVN instead of Git to lone developers.

Navigation

[0] Message Index

[#] Next page

Go to full version