Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
872 views
in Technique[技术] by (71.8m points)

git - Why do I have to resolve the same conflict over and over?

When I do git rebase branch1 in my branch1-local I get conflicts. I solve the conflict, do git add <conflicted-add> and then do git rebase --continue as git asks me to do. After that a new commit is applied. A new conflict shows up. But is the same conflict again! the same file!. I do it again, git add, the git rebase --continue, and then it all repeats again until I do repeat this for each commit being rebased on.

Why rebase is having me redo the same conflict resolution over and over again?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

What you want is git rerere which records conflict resolutions for you. The best introduction to this I have seen is now part of the Git Book, Tools chapter. In practice when you perform a rebase, you will end up stopping as before but you only have to check the merge conflict remains resolved then git add it and continue.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...