Use Git-flow in Sourcetree for making “develop” branch in your repository

Sourcetree is an amazing tool for managing your code base and in this post I am going to describe how you can make “develop” branch using “Git-flow” feature of Sourcetree.

One of the basic purpose of git repository is to manage code coming from various number of team members. Firstly, all the members work on their own branches and they are merged to “develop” branch for testing and than final code is merged to master branch. Without any further reading lets move to the real thing!

Step 1:

Open Sourcetree and in the branches drop down on left sidebar you can see only one branch “master”. Click on “Git-flow” button on top bar and a modal will appear on the screen.

Git Flow Sourcetree 1

Step 2:

In the modal you can change the name of “develop” branch but the default naming conventions are used all over the world so I suggest keep the defaults. Click on “OK” button in the bottom.

Git Flow Sourcetree 2

After clicking this button if you check on the “Show Full Output” beneath the progress bar than you will see the process completed successfully or not.

Git Flow Sourcetree 3

Step 3:

After successfully completing step 2 you will be able to see “develop” branch in your local branches but only “master” branch under “Remotes”. For making remote branches list updated you have to click on “Push” button on top bar and a new window will pop up.

Git Flow Sourcetree 4

Step 4:

On this new window check the “develop” option and click “Push”

Git Flow Sourcetree 5

After successfully pushing you will be able to see both “master” and “develop” branches under “Remotes”.

Git Flow Sourcetree 6