Thursday, September 18, 2014

How to resolve merge conflicts after git rebase ?

Have you faced a merge conflict while performing git rebase operation ? This is quite possible  if two commits modify the same line in the same file. Now git is confused which change to apply.
Git gives us several options in such a case :
  • git rebase --continue
  • git rebase --abort
  • git rebase --skip
1. git rebase --continue
Used in case if you have manually corrected the conflicted files. So after resolving the merge issues manually , use command rebase --continue so that git can continue processing the rest of the rebase.

2. git rebase --abort
Use this command if you want to completely undo the rebase. So the branch will return to the state that was before rebase was called.

3. git rebase --skip
Used to completely skip the commit. None of the changes introduced by the commit will be included.

Happy Learning !!!


1 comment :