forum/HowTo Conflict Resolutiongit-annexhttp://git-annex.branchable.com/forum/HowTo_Conflict_Resolution/git-annexikiwiki2016-05-05T10:01:21Zcomment 1http://git-annex.branchable.com/forum/HowTo_Conflict_Resolution/comment_1_81c06a0590ee828749b8d07e008028bb/joey2015-09-21T16:56:11Z2015-09-21T16:49:43Z
<p>The "variant" names are based on a short hash of the key
of the file, so there's no way to get from such a name back to the
repository that the file was added to.</p>
<p>What you can do is, look at the <code>git log --stat</code>, and find
the two conflicting commits, and use git to either revert back to one of
the two, or reset back to before the automatic merge and manually
merge the two.</p>
<p>(Of course, this all works best when the repository is
in indirect mode and you can use any git commands you like to slice and
dice it. When the repo is direct mode, you might be able to run those
same git commands via <code>git annex proxy</code>)</p>
comment 2http://git-annex.branchable.com/forum/HowTo_Conflict_Resolution/comment_2_e0ec78f09e5aba83ad3a7252695e4d96/Horus2016-04-17T14:10:15Z2016-04-17T14:10:15Z
<p>A very belayed reply...</p>
<p>I would really love to see a feature to make this easier! Like</p>
<ul>
<li>Interactive merge: During merge the user is asked for each file that conflicts, if it wants to keep the local or the remote</li>
<li>A set merge tool: A tool that allows to either select the local or remote file, renames it accordingly and commits it.</li>
</ul>
<p>Currently, I really fear a merge conflict, because I work with sets of binary files that needs to be in a coherent state and a merge conflict gives me very much trouble restoring that state.</p>
<p>Thanks!</p>
comment 3http://git-annex.branchable.com/forum/HowTo_Conflict_Resolution/comment_3_495aea6e73fd7a2d7a387f539496ac3a/Horus2016-04-17T14:10:37Z2016-04-17T14:10:37Z
<p>A very belayed reply...</p>
<p>I would really love to see a feature to make this easier! Like</p>
<ul>
<li>Interactive merge: During merge the user is asked for each file that conflicts, if it wants to keep the local or the remote</li>
<li>A set merge tool: A tool that allows to either select the local or remote file, renames it accordingly and commits it.</li>
</ul>
<p>Currently, I really fear a merge conflict, because I work with sets of binary files that needs to be in a coherent state and a merge conflict gives me very much trouble restoring that state.</p>
<p>Thanks!</p>
comment 4http://git-annex.branchable.com/forum/HowTo_Conflict_Resolution/comment_4_b209d4527bec4620e1014fe759cbdde7/joey2016-04-20T16:46:10Z2016-04-20T16:43:10Z
<p>git's default handling of merge conflict resolution is to require you to
manually decide which of the two versions of the file to use. So, if you
just don't use git-annex sync, and instead use git pull, it seems to me
you'll get what you want.</p>
<p>(You could also use <code>git annex sync --no-pull --content</code> to let everything
except for the pull and merge be done by that command, and run the git pull
manually first.)</p>
comment 5http://git-annex.branchable.com/forum/HowTo_Conflict_Resolution/comment_5_446186626e5b2d08d078e3b48be06bfa/Horus2016-05-05T10:00:20Z2016-05-05T10:00:20Z
<p>Ok, that something I can understand.</p>
<p>But still, I think, when using git-annex from the command line the situation of a merge conflict is still extremeley hard to handle. What is the reason against adding from which remote the conflicted data comes from?</p>
comment 6http://git-annex.branchable.com/forum/HowTo_Conflict_Resolution/comment_6_83cafddb480fa9e5b5d87d27b994b2bc/Horus2016-05-05T10:01:21Z2016-05-05T10:01:21Z
Normal git also has merge markers that the tell me about which part is from HEAD, which from the branch to merge.