git get conflicts from past merge without running merge once again

前端 未结 2 1266
谎友^
谎友^ 2021-02-19 09:46

I\'ve merged two branches. Got lot\'s of conflicts. Resolved them all. Now I\'m not sure, maybe I\'ve made an error during conflict resolution. And I don\'t see no another way t

2条回答
  •  一生所求
    2021-02-19 10:32

    If you want to look at what the merge did you can do

    git show 
    

    If you want to redo the entire merge you do

    git checkout 
    git reset --hard 
    git merge 
    

    If you want to redo the merge and then compare the second merge to the first merge (to consider if it was better) you can do:

    git checkout 
    git rev-parse HEAD
    

    This gives you the hash of the current commit. Note it down. Then do

    git reset --hard 
    git merge 
    

    Finish the merge, then do this to compare the merges

    git difftool 
    

    If you felt that the original merge was better, you can do

    git reset --hard 
    

提交回复
热议问题