We are using Gitflow for our git branch workflow (through TFS). When a release is successful we do the following
Step 1 creates a commit (Merged PR XXX: Merge release to master)
Step 2 creates a commit (Merged PR YYY: Merge release to develop)
When I look at our branches it says that develop is one commit behind master. This is because the commit (Merged PR: XXX) is not on develop.
Is the correct procedure to simply create another pull request from master to develop (even though there are no changes in pull request)?
I don't see this on the standard Gitflow model
In the Git flow development model, you have one main development branch with strict access to it. It's often called the develop branch. Developers create feature branches from this main branch and work on them.
This will be fiction length, so my apologies. The short answer I'm submitting is the completion of a git flow release should result in develop
being a commit ahead of master
based on how git flow origniator Vincent Driessen implemented his own git-flow scripts.
I'm not sure about your experience with git-flow
so forgive me if I'm stating the obvious. The git-flow
spec has a set of scripts to make its use easier. Git flow scripts ship out of the box with Git for Windows which I'm assuming you're using based on your TFS reference.
Let's check the history of a recent release via Git Bash
$ git log --oneline --graph --decorate
which yeilds
In the image above you'll notice
$ git flow release start v2.1.0
.release/v2.1.0
. This branch only contains one commit -- an increase in the version number.$ git flow release finish -k
release/v2.1.0
into branch master
master
into develop
to ensure all commits in the release
branch make their way back into development of the next release.If you're using TFS PRs in your workflow you probably see something like this when you're ready to complete a release PR.
In my shop, we use PRs too, but I merge locally using $ git flow release finish -k
, then push the master
and develop
branches. TFS recognizes that the release branch has already been merged and will give you the option to "Close" rather than "Complete" the PR as shown below.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With