Re: backup git repo on every commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 12, 2009 at 08:41:15AM -0500, Israel Garcia wrote:
> Which is the simplest  way to backup a git repository after every commit?

Using githooks(5) you can put a simple post-commit script in .git/hooks.

Maybe something like:
-->8--
#!/bin/sh

cp -a `pwd` `pwd`.`date +%s`
--8<--

Don't forget to make the script executable.

Regards,
chressie
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]