Git will stop rebasing if it detects conflicts it cannot automatically resolve. In your case, you have a conflict in the file index1.txt
(you can see it in the output, and later on as well when running git status
). You must fix the conflicts before continuing. Edit the file, and you'll see <<<<<<
, ======
and >>>>>>
markers. The conflict is in those lines, where what's between the <
and the =
is the changes in master, and after that (until the >
) is the changes in branch b1
. Fix it, remove the git markers (<
,=
,>
), then run git add index1.txt
, and move on to the next file (if you have any, in this example only index1.txt
conflicts). Once you're done adding all files, run git rebase --continue
. If git encounters another conflict, simply repeat the process for each file(s) it has problems with. Once you're done, git will tell you that rebase has successfully finished, and you'll be back on branch b1
. If you want to stop the process and return to the original b1
(before the rebase command), simply run git rebase --abort
.
Remember that when you fix conflicts, don't edit the file to be as it should be in your final commit, rather only introduce the changes you wanted for that specific commit. Other changes will be added as git continues rebasing and applying your commits.