GitFlow, one of the most successful branching models

GitFlow is a workflow or set of procedural rules while working with Git.

In GitFlow there are two main branches: master branch and develop branch

All new features and fixes are done in a feature branch, except for hotfixes. A feature branch is branched off of the develop branch. When a feature is completed, it is merged back into the develop branch

Release branches are also branched off of develop. A release branch is deployed and tested and if any problems come out they are fixed in the release branch. Release branches are merged into the master branch and into the develop branch

Releases have always a version number. Release commits are tagged with the version number

You will problaly want to install GitFlow to automate the process. After installing GitFlow will be able to run additional commands (Which are a sequence of Git commands)

$ git flow init

Initializes the current directory as a git repository and creates two branches named ‘master’ and ‘develop’

$ git flow feature start new-banner

Creates a new branch named ‘feature/new-banner’ and switches to that branch

$ git flow feature finish new-banner

Switches to branch ‘develop’ and deletes the branch ‘feature/new-banner’