Hi Jason,
On 28/10/2017 14:49, Jason Pyeron wrote:
> I would like to efficiently backup my project directories.
>
> I am thinking that the backup of a git enabled project should only backup the
> following sets of files:
>
> Files under .git/
> The results of git clean -ndx
> The results of git status
>
> Does this make sense? Is there a less expensive way to calculate the backup
> file set? I ask because sometime git status takes a long time.
What do you consider being an "efficient backup", which files are you
actually interested in making the backup of...?
Do you use submodules? If not, and if your backup thoughts show the
idea of files you want to keep (committed + untracked + ignored +
modified, basically all of them), I think the easiest approach is to
just backup the whole project folder - that way you keep committed
history (".git" subfolder/repository) plus all additional uncommitted
work as well (untracked/ignored/modified files inside the working
tree), and no extra calculations are needed.
In case you don`t care about uncommitted stuff, you can just backup
".git" subfolder (the repository), it keeps project`s whole history,
with all versions of all the files in it (thus latest included).
Regards,
Buga