Re: backup git repo on every commit

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

 



Hi Shawn,

That's OK, but I want to backup my git repo locally because I don't
have another remote git server. Can you modify your post-commit code
to backup the repo to /backups/git folder instead of using another
external git repo?

thanks in advance.
regards
Israel.

On 10/12/09, Shawn O. Pearce <spearce@xxxxxxxxxxx> wrote:
> Israel Garcia <igalvarez@xxxxxxxxx> 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@xxxxxxxxxxxx:path/to/backup.git
>
>   cat >.git/hooks/post-commit
>   #!/bin/sh
>   git push backup
>   ^D
>
>   chmod a+x .git/hooks/post-commit
>
> --
> Shawn.
>


-- 
Regards;
Israel Garcia
--
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]