Re: git add -p and unresolved conflicts

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git add -p and unresolved conflicts

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:53:25

Holger Hellmuth [off-list ref] writes:
and additionally the following three options:
b - choose the base version
< - choose our version
quoted
- choose their version
What does it mean to "choose" in this context? In general, it means "put
this into the index", but if the file is in conflicted state, you have 3
different versions of the file in the index.

And you miss the most usefull (to me at least): "choose the version in
the worktree".

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: git add -p and unresolved conflicts

From: Holger Hellmuth <hidden>
Date: 2016-06-15 22:53:25

On 28.03.2012 21:38, Matthieu Moy wrote:
Holger Hellmuth[off-list ref]  writes:
quoted
and additionally the following three options:
b - choose the base version
<  - choose our version
quoted
- choose their version
What does it mean to "choose" in this context? In general, it means "put
this into the index", but if the file is in conflicted state, you have 3
different versions of the file in the index.
The only ways to exit with the proposed reduced options is to either 
quit adding this file (which is comparable to Eriks option 4) or 
resolving all conflicts in the file thereby allowing to add this file to 
the index.
And you miss the most usefull (to me at least): "choose the version in
the worktree".
But the conflicted chunks are of the form "<<<< our ... |||||||||| 
theirs >>>>>>" in your work tree. So there are two cases:

a) You have removed the markers thereby removing the conflict -> this 
means the chunk will not be offered to you as a conflicting chunk

b) You haven't removed the markers. Then there is a choice between base, 
our and their version.
If you had edited one of the versions between the conflict markers in 
your working tree without removing the markers (which wouldn't be a 
sensible thing) then it depends on whether the chunk in the working tree 
or the versions in the index are used as a basis for the choosing, but I 
suspect using the working tree version is easier to do.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help