In principal git-flow is a naming convention for our branches:
Feature Branch Prefix
Hotfix Branch Prefix
Release Branch Prefix
Create a new feature
Lets say you want to add a new feature called YOURFEATURE to the code.
First, you have to create a new branch called feature/YOURFEATURE, you can do this in your local repository by
git checkout -b feature/YOURFEATURE
Now you are ready to develop your feature and add commits as you like. Once the feature is ready, it has to be merged into develop. This can be done by e.g.:
git checkout develop git pull origin developgit merge --no-ff feature/YOURFEATURE# You may have to clear some merge conflicts at this pointgit push origin develop# If you do not have rights to push into develop directly open a merge request.
Make sure you set the --no-ff tag when you merge your feature into develop. The non fast-forward merge allows to easily revert a single feature, if necessary. The effect of --no-ff is described in detail here.