On one my repos (git repo on github data on S3) I've started getting, fatal: Cannot force update the current branch
git-annex: failed to update refs/heads/master
other clones of this repository can sync fine but this one started failing after adding a couple of files.
git annex sync --debug
output.I'm experiencing the same problem in one of my repositories on a couple computers now.
I'm facing the same situation as the other commenters.
Seems to be a problem with the command
git branch -f master
What branch does
git branch
say is checked out?If you're using direct mode, you should not have the master branch checked out. Instead you should have an
annex/direct/master
branch that direct mode sets up and automatically switches you to. (Commits are still made to the master branch when syncing.)git checkout annex/direct/master
I seem to have the same problem. I have two repositories added as ssh remotes to one another with the assistant.
git-annex sync
works on one of these, but not on the other, failing with the same error as above. Also, runninggit-annex sync --debug
results in the same output as in Remy's above post.git-annex repair
doesn't find any problem. Runninggit branch
on both shows that neither repository has anannex/direct/master
branch, and both havemaster
checked out.One of the repositories has the current version from debian wheezy-backports, 4.20131106~bpo70+1, installed, and the other one had 5.20131130 from unstable as of when I discovered the problem (I upgraded it today, but the problem persists). I'm not sure, but I think those were the versions I used to create the repositores, too.
Trying to reproduce the problem, I created a new repository via assistant on both computers, the one running 4.20131106~bpo70+1 and the one recently upgraded to 5.20131213. On the 5. one, a
annex/direct/master
branch was created and checked out, but not on the 4. one. However, adding each other as ssh remotes with the assistant makes theannex/direct/master
on 5.* disappear andmaster
to be checked out on both.Is there anything I can do to fix the repositories? Is there any other info I could provide to help with this?
Same problem here:
This is a direct mode repo, too.
It seems that git-annex didn't properly update the repo. .git/config shows:
Thank you, Joey! FYI, my repo was automatically converted to version 5 and put on the annex/direct/master branch. As Joey mentioned, this might only apply to my bug.
I'm having the same problem with my direct repo:
git branch -a git-annex * master synced/git-annex synced/master remotes/cluster/git-annex remotes/cluster/master remotes/cluster/synced/master
git annex version git-annex version: 5.20140818-g10bf03a build flags: Assistant Webapp Webapp-secure Pairing Testsuite S3 WebDAV Inotify DBus DesktopNotify XMPP DNS Feeds Quvi TDFA CryptoHash key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL remote types: git gcrypt S3 bup directory rsync web webdav tahoe glacier ddar hook external local repository version: 5 supported repository version: 5 upgrade supported from repository versions: 0 1 2 4
The
git annex checkout annex/direct/master
workaround mentioned above did not work for me, but this did:git annex indirect git annex direct
after that, my repo was on the annex/direct/master branch