Home‎ > ‎

Rebasing Features in SourceTree

Since SourceTree could use some clarification on how to correctly rebase in feature branches, in general do this:
This article is based off of the git tutorial found here.

When you get to the point that you are ready to merge back in your feature branch do the following.

1) To start check out your feature branch by double clicking on your feature branch.
2) Rebase the target branch you are trying to merge into. Do this by right-clicking the target branch and selecting rebase. In almost all cases this should be the develop branch. Before you move onto the next step make sure you finish your rebase and resolve any conflicts that arise while doing so by selecting resolve using 'mine' () or 'theirs' (). There should be nothing left in the unstated category when you are done with this. Don't commit during this process it makes a mess. If continue rebase is an option under the actions tab it means you haven't finished your rebase. You will have to click continue rebase once for each conflict git encounters during the rebase. Once you have finished then you can move onto step 3.
3) Checkout the target branch you are merging into. Develop. 
4) Now merge your feature branch into Develop. Do this by right-clicking the feature branch and selecting merge. Resolve conflicts if any and you are done.

For more advanced examples see the tutorial referenced above.