views:

46

answers:

3

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 anyway...Thanks.

+5  A: 

why not just tar the whole thing? no need to use git archive

fseto
+1  A: 

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.

Daenyth
A: 

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".

VonC