I have a simple backup system where a git clone created using --bare
(it might have been --mirror
) run git fetch
every hour. The idea is that if something happens to my working copies that I have a backup of my work in the clone.
This system works great, but I'm getting an error when I run git fetch
:
$ git fetch
remote: Total 0 (delta 0), reused 0 (delta 0)
error: unable to find 2a8c978c41c362c3f0c42775c9124780a0e71e08
fatal: object 2a8c978c41c362c3f0c42775c9124780a0e71e08 not found
When I look in the original repository for the object, it's a stash:
$ git show 2a8c978c41
commit 2a8c978c41c362c3f0c42775c9124780a0e71e08
Merge: 808f6e4 ddc28da
Author: Russell Silva <russell.silva@blahblah.com>
Date: Wed Feb 29 10:19:26 2012
WIP on experimental: 808f6e4 blah blah blah
It looks like the fetch is mostly successful; git log <branch>
shows up-to-date branches. But the errors are pesky. How do I get rid of them? How do I keep them from recurring?
Note that this question is different from this one where someone actually wants to fetch a stash. I don't care if my git fetch
commands fetch stashes; it's fine if they don't.
EDIT: the full output of git fetch --verbose
was requested:
$ git fetch --verbose
remote: Total 0 (delta 0), reused 0 (delta 0)
From /home/russell/work/russells-project
= [up to date] some-branch -> some-branch
error: unable to find 2a8c978c41c362c3f0c42775c9124780a0e71e08
fatal: object 2a8c978c41c362c3f0c42775c9124780a0e71e08 not found
I have changed names in the output to conceal private information and eliminated all but one of the "[up to date]" lines -- there's dozens of them, one for each branch in the repository.
Also, my remote is on the local filesystem; it's not being accessed over the network.
$ git remote --verbose
origin /home/russell/work/russells-project (fetch)
origin /home/russell/work/russells-project (push)