I am working in a clean repo with just a single file. I am the only developer.
I want to do the develop-release-master workflow in A succesful git branching model so I did:
Note: Please bear in mind that I have the fast forward off by default, so consider all the merge
commands as merge --no-ff
.
My origin is Github.
In master branch:
git add .
git commit -m "Initial commit"
git push origin master
git checkout -b develop
In develop branch. I do a change to the file, then:
git add .
git commit -m "work in the file"
I am ready to release this as the version 0.0
git checkout -b release-0.0 develop
In release-0.0 branch. I add a version number to the file.
git add .
git commit -m "Bumped version 0.0"
I am ready to merge this release into master.
git checkout master
git merge release-0.0 -m "Releasing v0.0"
git tag -a 0.0 -m "Version 0.0"
... and into develop.
git checkout develop
git merge release-0.0 -m "Merge release 0.0 into develop"
Then I push both master and develop to Github
git push origin master
git push origin develop
When I check the develop branch in Github, it says:
This branch is 1 commit ahead, 1 commit behind master.
The master branch does not have a message like that.
What can I do to fix this? Both master and develop should be equal at this point, as they were merged both with release-0.0.
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.