including the .git folder when running git archive
I want to use git archive to make backups of my repository, but the backups created do not contain the .git folder. Is there an option to pass in to force it to include the .git folder? I mean it includes gitignore, etc an开发者_开发百科yway...Thanks.
why not just tar
the whole thing? no need to use git archive
An easier option than tarring is to just make a bare repo on another machine (github is great if you don't have a spare server) and push to it. Dropbox works too, but make sure you do a bare repo and not a working copy.
Another option for backup is to use git bundle
See "backing up project which uses git" for a difference between:
git archive
git bundle
You can combine git bundle
(producing one file which can act as a repo of its own, and which can be cloned to restitute a fully functionning .git
repo) with DropBox if you want: See "Git with DropBox".
精彩评论