From my understanding one of the advantages of creating feature branches is so that you can easily see where large groups of commits have been merged into the develop branch.
Upon finishing a feature branch the recommendation is to delete the feature branch since it is no longer needed for development. Once the branch has been deleted, will the graph still be annotated with "feature/my-fancy-feature" branched and merged?
From my understanding one of the advantages of creating feature branches is so that you can easily see where large groups of commits have been merged into the develop branch. Upon finishing a feature branch the recommendation is to delete the feature branch since it is no longer needed for development.
So in our case, when we "finish" a git flow branch, it makes sense to immediately push the branches + tags to the remote instead of having to enter the git flow commands directly. After entering this config, git flow will automatically push the branches on the remote, thus saving extra time and avoiding confusion.
Use the “git flow release start” command to create the release branch. When the release is stable, run the “git flow release finish” command. $ git flow release finish '0.1.
No, but you won't be able to merge your work into develop without merging also the commits from the feature branch. If feature branch is merged when you finally merge your own work to develop , all the common commits won't be merged twice.
"Upon finishing a feature branch the recommendation is to delete the feature branch since it is no longer needed for development."
"Finishing" is an ambiguous expression here. To make sure I fully cover your question, I believe you meant either one of the following cases:
(1) If you wish to discard the feature/my-fancy-feature
:
git branch -d feature/my-fancy-feature
(2) If you meant to merge the feature/my-fancy-feature
:
git flow feature finish my-fancy-feature
"Once the branch has been deleted, will the graph still be annotated with "feature/my-fancy-feature" branched and merged?"
It depends (the outcome is not git-flow
dependent). git log
won't give you the specific branch name (e.g. feature/my-fancy-feature
). It will only give you the commit history with the message. Recalling the differences between fast-forward merging and non-fast-forward merging:
fast-forward-merge (all commit history made in feature/my-fancy-feature
will remain):
git merge
non-fast-forward-merge (all commit history made in feature/my-fancy-feature
will be gone):
git merge --no-ff
Refere to the following illustration from Vincent Driessen's article:
To enable non-fast-forward feature in SourceTree, check the below global preference option found from Menubar-> SourceTree -> Preferences -> Git
:
For further explanation, I found this excerpt from SourceTree's "Help Center":
disables fast-forward behaviour when merging, meaning that an explicit merge commit is always created regardless of whether there are other changes in the receiving branch. This can be useful if you want to maintain an explicitly separate line of development in all cases.
Hope it helped!
No, only the commit messages will remain; if you want to retain the name of the branch, be sure to include it in the merge commit or explicitly tag the merge commit with a related name.
Your best bet is to stop worrying about retaining this data outside of the commit messages; by the time you merge your feature branch, you shouldn't care that the work was done on a feature branch.
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