merge - How to identify conflicting commits by hash during git rebase? -


When I'm struggling in a merger using git rebase , how do I Can I identify the source of conflict?

before git rebase - -continue , but sometimes the difference between files is not enough: I want to see commit logs and commitment of DIF which only fail to implement the tree that works in the works

I have read in other questions that git log --merge shows that if I was using git merge then the parent's you have to come. I tried it in any way, when I had to face the conflict and I was Fatal: -Merges without MERGE_HEAD? said.

How can I identify the problematic commitment?

short answer

if it says

 < Code> Patch 0001 failed message failed for F  

  $ head -1 .git / rebase-apply / 0001 to ad1c7739c1152502229e3f2ab759ec5323988326 Mon September 00 00 : 00 2001  

Use the git show ad1c77 to get SHA ad1c77 of the failed commitment, and then to see it Please.

Long Answer

Start with this tree:

  a --- B --- C --- D \ E --- F --- G $ git checkout G $ git rebase D  

When a leak is conflicts, it

  • Upstream changes ( C- -D ) PLUS from the common ancestor ( b ) already changed the reservation and the conflict already resolved ( e '

  • / P>

      1) A --- B --- C --- D --- E '& lt; - E Patch and successfully committed as E '2) A --- B --- C --- D --- E' --- & lt; - E failed to patch 'e'  

    Here is the error message:

      First of all, to run your work again at the top Rewinding head ... Apply: Send message to F, Use indexing information to reorganize base base ... Fall back on patching base and 3-way merge. Automatically merge 1.txt CONFLICT (content): merge merge into merge merge into 1.txt fails to merge into changes. 0001 for Patch F01 failed on the committed message. First, you can see that it was  F , because the committed message appears, however, if your message is all "foo", "documentation" or " Some fixes ", it will not help you, and you really want the contents of SHA id  ad1c77  or the patch. How to know the real identity of 

    F :

    When this dispute shows a list of conflicts, then something like this will say:

    0001 Message message failed for fax

    Now look in .git / rebase-apply / , where you will find the patch file 0001 < / Code>:

      $ ls .git / rebase-apply 0001 head-name message orig-head sign 0002 info msg - Keep clean patch threeway next silent utf8  

    original reported-id in the last-commit after ribing

      $ head -1 .git / rebase-apply / 0001 to ad1c7739c1152502229e3f2ab759ec53 23988326 included Monday September 17th 00 00 00 00  

    You can then oak it on.

    There may be an easy way, but it works.

    Note that patch may fail a different commit (if you are rebasing on HEAD and a general ancestor of the reges target). Finding this is more complicated, however, you can try to reserve it to find it in reverse:

      $ git checkout D $ git rebase G  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -