I can backup my local .git by pushing it to a repository in two steps:
git push --all ~/gitrepo
git push --tags ~/gitrepo
I can back it up using git bundle.
I can back it up by simply copying the entire directory or archiving it (compressed!):
tar -zcvf gitrepo.tgz .git
And there are probably additional ways to backup an entire local .git.
The question now is whether they are really equivalent? (for example, the logs
subdirectory isn't pushed)
What are the advantages of the git push
method vs. git bundle
?
Can tar -zcvf
be considered "the perfect git backup"?