"Upon finishing a feature branch the recommendation is to delete the
feature branch since it is no longer needed for development."
Difference between "discarding" and "merging" the feature branch:
"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?"
Difference between "fast-forward-merge" and "non-fast-forward-merge"
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:
Update
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!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…