git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: backup git repo on every commit

From
Christian Himpel <chressie@googlemail.com>
Date
Oct 12, 2009, 18:35 UTC
Message-ID
<20091012183504.GA3872@mrslave>
In-Reply-To
<20091012141544.GF9261@spearce.org>
On Mon, Oct 12, 2009 at 07:15:44AM -0700, Shawn O. Pearce wrote:
Show 9 quoted lines
> Israel Garcia <igalvarez@gmail.com> wrote:
>   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

Since this is meant as a backup, is there also a sane way to push the reflog entries as well? Or is it okay just to copy .git/logs to the backup repository?

Thanks, chressie

Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 13 of 14 in “backup git repo on every commit”
  1. Israel GarciaOct 12, 2009
  2. Christian HimpelOct 12, 2009
  3. Shawn O. PearceOct 12, 2009
  4. Israel GarciaOct 12, 2009
  5. Shawn O. PearceOct 12, 2009
  6. Israel GarciaOct 12, 2009
  7. Israel GarciaOct 13, 2009
  8. Shawn O. PearceOct 13, 2009
  9. Israel GarciaOct 13, 2009
  10. Shawn O. PearceOct 13, 2009
  11. Israel GarciaOct 13, 2009
  12. Shawn O. PearceOct 13, 2009
  13. Christian HimpelOct 12, 2009
  14. Shawn O. PearceOct 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.