I mentioned a couple of weeks back how I am using Visual Studio to manage my local feature branches, however, I did not quite complete the picture. I merged my latest pull request with the master but I had an outstanding feature branch missing all the latest updates on the new master. The commit history of my older feature branch will be rewritten so that it starts from the most recent commit in the target branch of the rebase.  Here is great illustration of what happens:

Using Rebase to catchup up with changes  in the master branch

Rebase a local feature branch

  • Get the most recent changes on the master branch
  • Switch to the feature branch
  • Rebase your changes with the master branch (merging conflicts along the way)

Here is how to get this done with Visual Studio:


Now rebasing is not recommended from one feature branch to another, in that instances you should really perform a merge. Otherwise it would probably result in some weird situations with overlapping histories.

Comment Section

Comments are closed.