
Worth notice that the commits from master although happened after the commit of the feature branch, after the rebase all commits of master are showing before all the commits of the feature branch. Firstly let’s checkout on to the feature branch, then right click on the master branch and select rebase current changes onto master. Let’s now rebase the feature branch on to master. Now let’s checkout the master branch and commit also a change Now let’s do a simple change and commit the changes. We notice that there is only one branch (master) currently in the repository.īy tapping on the branch button we can create a new branch, name it feature/aFeature. This command sequence will squash all your commits into a single commit, with a clean name. Open up a terminal and type the following: git checkout master. Now let’s open the Sourcetree and tap on the local tab and then after scan a directory select the project you just created. To squash, your commit, ensure you have the latest copy of your main branch locally. Let’s start by creating a Swift project and make sure you select to create a git repository. Rebase as opposed to merge can lead to a more readable git history.


In this article we will see how we can git rebase using Sourcetree. Git is one of the most popular version control system, and Sourcetree is one of the tools that provide a visual interface and make it easier to work with Git. Also with tags we can track important milestones.

With source control we can check the history of a file, who and when modified a file, what was a reason for a change and which files changed together. There are many benefits of having a source control.
