From: Shawn O. Pearce Date: Mon, 12 Oct 2009 14:15:44 GMT Subject: Re: backup git repo on every commit Message-ID: <20091012141544.GF9261@spearce.org> In-Reply-To: <194a2c240910120641sccf0e55xef4226269df78864@mail.gmail.com> Israel Garcia wrote: > Which is the simplest way to backup a git repository after every commit? Add a commit hook to push to another location, e.g.: git remote add --mirror backup you@another.host:path/to/backup.git cat >.git/hooks/post-commit #!/bin/sh git push backup ^D chmod a+x .git/hooks/post-commit -- Shawn.