How to backup a local Git repository

1142300 pts.
Tags:
Backup
Git
We've been using Git for a small project and we found that zipping the .GIT directory's content was the best way to back it up. But when we restore it, we have to do this: git reset --hard. Is there any problems doing it this way? If so, what other options should we look at?
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

There is no problem in doing it that way (besides having to reset after restoring).  If it is a small project and you don’t need a more complex backup procedure or some special features from your backup, you are OK to continue without modifications.

Another option would be having a remote repository you can use to backup your local one (which is what I would recommend.  There are free services).  If there is no network connection between your local repository and your backup one, you could use Git bundle.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: