To reproduce it:
Why on earth this creates TWO commits in history with exactly the same changes?
The commits titles:
What is the point of that?
Sounds like you create one commit containing your changes (commit Full Issue name
) and a merge commit, merging changes from that commit into dev
branch.
The merge commit is usually created for every merge request. This can be changed in Settings
->Merge Request Settings
by choosing e.g. Fast Forward Merge
instad of Merge Commit
. This will lead to only one commit on top of your current dev
HEAD, which will only work if dev
can be fast forwarded.
Checking squash commits
will squash all commits in the feature branch you want to merge before merging it. Thus, if you had more than one commit in your feature branch, they would be squashed into one commit, which would be merged, creating a merge commit as you described (as long as your merge request settings are set to merge commit
, see above).
The point of that is that you might want to see that changes were performed on a different branch. This is done by not fast forwarding the branch you merge into, but create a merge request instead. This displays that two lines of development were merged, while a fast forward merge (not creating a merge commit) would not.
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