Friday, January 23, 2015

Git rebase

Rebase is needed to put your history on top of history of the given branch, when you don't want to see instances of merge in the given branch history. This is important for keeping the main branch history clear.
Rebase process:
git rebase [upstream/master]
Hopefully, everything is ok. If there are conflicts, resolve them by hand or use theirs/ours:
git checkout --theirs (or --ours) filename
Then you need to add the edited file:
git add filename
And continue rebase if hand edited/used theirs or skip it otherwise:
git rebase --continue (or --skip)

No comments:

Post a Comment