git — Basic Rebase

Filiz Senyuzluler
1 min readAug 9, 2018

--

Let’s say you have done your changes on feature_branch and you want the master branch to have these changes too.

While you are on ‘feature_branch’,(assuming you are using Sourcetree) right-click on master and choose ‘rebase current changes onto master’. There will pop up some conflicts, you are going to fix them (on this step you shouldn’t write any commit and push the changes) and then you can continue on the terminal.

on the terminal window, write:

git status (to check the status)git rebase --continue

New conflicts will arrive if there are any. You are going to fix them too. If you want to skip some changes write

git rebase -skip

Continue to look if there are more conflicts,

git rebase --continue

when the rebase is finished, write:

git statusgit log

(there will appear some changes on remote to pull but do not pull them, instead of doing force push)

git push -f

--

--