This commit is contained in:
cbaines 2019-07-13 17:22:16 +00:00 committed by admin
parent 6b96da415a
commit 20748d0fed

View file

@ -0,0 +1,27 @@
I'm having some problems with a direct mode Git Annex repository, created through the Assistant.
I've got two diverged copies of the repository, and I want to reconcile the differences. I ran git annex sync, and it generated a load of files describing the conflicts. I don't want this as I just want to merge preferring the state from one particular repository.
I know this is possible to do in Git, and while having a direct mode repository makes this trickier, this is what I've attempted. I ran:
```
git annex proxy -- git merge remotes/remote1/master -X ours
```
This worked for some files, automatically resolving the merge conflict. However, some files were modified in one repository, and deleted in the other.
Unfortunately, `git annex proxy` now refuses to work due to this:
```
git-annex: Failed to set up proxy work tree.
CallStack (from HasCallStack):
error, called at ./Command/Proxy.hs:60:33 in main:Command.Proxy
```
So, I can't run the git commands I need to.
Reading the direct mode page, it does state that any git command will work if you pass `-c core.bare=false`. I've tried this with the status, merge and add commands, but all of them refuse to work (saying: `fatal: this operation must be run in a work tree).
My immediate problem is trying to recover the repository I've seemingly broken. I can't work out how to either abort the merge, or resolve the conflicts. Any ideas?
More generally, it would be interesting to know what I did wrong to get in to this mess. All I wanted to do was a merge without having to go round and sort all the variant files that would have been generated by a simple sync.