I'm burning my stuff on a dvd, before a quick reinstall. Never done that with git, being a recent user. So I'm just checking with you guys. If I understood correctly, I just need to backup my project directory project_name (which has .git inside it) watching for hidden files along with it, and when I copy it onto the "new" machine, and install git again, I resume like nothing happened ? Correct ?
Git – Backing Up a Project Using Git
git
Best Answer
If you only want to backup project files (without history), you can use
git archive
(that way, I do not have to "watch for hidden file")The script
git-archive-all.sh
will actually archive all git repositories and submodules in the current path.As Charles Bailey rightly mentions in the comments,
git bundle
is more appropriate, to preserve the history. (git bundle
was introduced in February 2007).See Backing up a git repository with git bundle