Squash Commits and Version Calculation #3697
-
Hello! I have run into some issues working with a very standard gitflow release structure as described on the GitVersion documentation: https://gitversion.net/docs/learn/branching-strategies/gitflow/ However when making squash merges or single commits to the main branch, the version calculation gets messed up. Eg)
This also happens on commits to main (I am aware that the docs above specify that you only merge release and hotfix branches in main, I'm just wondering if this is an intentional design or if it is not possible). From what I understand: Gitversion.yaml file:
Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
If you want to only have non-merge commits on |
Beta Was this translation helpful? Give feedback.
I think the logic is located in MergeMessageVersionStrategy.cs... You can see it is only working for merge messages with two parent commits which is not the case for squash merges:
Your issu is related to the following issue in my opinion: #3689
Is there any other issue existing @asbjornu? If not maybe it is good to create a new bug or feature issue.