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

using git-push to backup repo...strange behavior

From
davetron5000 <davetron5000@gmail.com>
Date
May 30, 2008, 12:42 UTC
Message-ID
<3a6159d2-e1ff-4aa8-bfeb-806af2bc82c8@8g2000hse.googlegroups.com>
at least to me.

I have a git repo locally. Want to essentially back it up on a remote server using git.

First step was tar/gz the repo, scp it to my server and expand it. Periodically throughout the day, I will do a

git push ssh://my.hostname.com/path/to/git/repo
There's a few issues:
1. Sometimes it doesn't work, saying a branch is "non fast forward".
--mirror or -f fixes this, but it seems wrong; I make no changes
remotely and clocks are in sync
2. --mirror doesn't like git stash, saying 'stash' is a "funny
refname"
3. On the remote side, I can find no way to update the working dir
with the changes other than git reset --hard.  Do I even need to do
this?  I'd like to be able to for automated builds/tests someday.
4. I made post-update executable, but it never runs (it echos a
message to a file)

I can't help feeling I'm doing everything wrong and just chancing on things working under certain conditions.

Dave
Next: Teemu Likonen
Message 1 of 3 in “using git-push to backup repo...strange behavior”
  1. davetron5000May 30, 2008
  2. hooks/post-update does not runTeemu Likonen, May 30, 2008
  3. david@lang.hmMay 30, 2008

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.