"This branch is 1 commit ahead, 1 commit behind master" in Github while using "A successful Git branching model"

Just to add to the other answers:

The original git-flow hasn't been in development since 2012, and it has been superseded by git-flow AVH edition in many places (including the Ubuntu repositories and Git for Windows).

One of the differences introduced by the AVH edition is that the final merge is that of master* into develop rather than that of release into develop.

This makes master a direct parent of develop and should eliminate one part of the message you see; only "1 commit ahead" should remain. It also makes it slightly easier to verify that master and develop have not diverged by accident.

* More precisely, it is the new tag (on master) that is merged into develop.

No it won't be equal, since you have fast forward disabled by default. Every merge creates a new commit and the merge commit has a different id. So the merge commit in master is not the merge commit in develop. And hence develop has a commit not in master while master has a commit not in develop. Hence the message in develop.

As for the message not being there in master, that is because the message comes when a branch is compared to master. So if you compare master with master, the message is not necessary.

One solution is to enable fast forward and explicitly create merge commits in release and master and then keep fast forwarding develop. The other option is to rebase develop after every merge to master. How you want to go about it is purely your personal choice depending on your workflow and code.

Also the message being there isn't something you should be worried about as long as the code in the branches is exactly as you want.

Because you are using --no-ff every single merge will be a different commit. When you merge release-0.0 into develop and into master the merge commits will be different. Here is how it looks like:


As you can see the develop branch has one commit (Merge release 0.0 into develop) which is not in (not reachable from) the master and the master branch has one commit (Releasing v0.0) which is not in the develop branch. And that's what GitHub says with that message and it is totally fine (the contents are the same, but the commits different).

If you would like to use git flow you should take a look at https://github.com/nvie/gitflow, which will help you a lot.