I _think_ you want the 'git checkout -p --<file>' command.

read all three part of the manual pages: the command explanation, the option 
explanation, and the link to the git add page.

As I understand it (I haven't used it) it allows you to progress through each 
of the change hunks (or lines) from the checkout of the fixup file, so that you 
can just pick the ones you need. Have a try with it.

I also suspect there is something within the git gui, or gitk to pick off the 
parts you need but that may be more involved. I ceratinly use the git gui to 
visualise what changes are in the index and those that are still in the 
worktree, so that I can finesse the lines I want committed.

Philip
  ----- Original Message ----- 
  From: Simon Vandyk 
  To: [email protected] 
  Sent: Friday, November 25, 2016 6:26 PM
  Subject: Re: [git-users] git revert merge commit with bad conflict resolution 
and re-merge


  Hi Philip, thanks for your prompt reply. 


  In answer to your first question; unfortunately its not the latter, there 
have been several commits since by various developers, so resetting is not an 
option. 


  In terms of the 'bigger' problem, the amount of conflicts wasn't the issue 
here, its just one conflict had been resolved incorrectly by a developer and 
they had removed a piece of someone else's code by accident when resolving the 
conflict.


  Regards


  Simon


  On 25 November 2016 at 18:13, Philip Oakley <[email protected]> wrote:

    From: Simon Vandyk 
      Sent: Friday, November 25, 2016 4:47 PM


      I know its a mouthful of a subject line, but I've come across this 
situation quite a few times now, and after searching everywhere for an answer 
without any luck i have finally perked up the courage to ask you guys. 


      So to elaborate on the subject line, how can i revert a 'merge' commit 
with some bad conflict resolutions in and then re-merge it in, I have tried 
reverting the merge commit then reverting the revert and merging back in again, 
but it does not ask me to resolve any conflicts the second time round, i 
essentially want to re-do the conflict resolution part. Is there any way to do 
this without cherry picking etc?
    --
    Is this merge commit some way back in history, or are you catching the 
mistake immediately?

    If it is the latter, then just reset the current branch to just before the 
merge (first parent), and then redo the merge. The side branch should still be 
at the point just before the merge.

    Is the problem 'bigger' i.e. simply that there are too many 
conflict/changes to fix-up in one go and get them all right?

    Philip

    -- 
    You received this message because you are subscribed to a topic in the 
Google Groups "Git for human beings" group.
    To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/git-users/eCxs6zyJEoI/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to 
[email protected].
    For more options, visit https://groups.google.com/d/optout.




  THIS E-MAIL AND ANY ATTACHED FILES ARE CONFIDENTIAL AND MAY BE LEGALLY 
PRIVILEGED.
  If you are not the addressee, any disclosure, reproduction, distribution or 
other use of this communication is strictly prohibited. If you have received 
this transmission in error please notify the sender immediately and then delete 
this e-mail. Any personal opinions or statements contained in this e-mail are 
not authorised or endorsed by Totally Communications or any of its 
subsidiaries. Totally Communications is not liable for any viruses associated 
with this transmission. 

  -- 
  You received this message because you are subscribed to the Google Groups 
"Git for human beings" group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to [email protected].
  For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to