-
-
Notifications
You must be signed in to change notification settings - Fork 188
Description
Few of the teams I work with has put in restrictions on their repo to reject any direct commits on the develop and master branches , and allow only merge commits to be pushed to remote.
So when I do feature-finish for eg. , if the feature version in pom is 1.0-feature1-SNAPHOT , it merges that in to develop, then update the version in develop to 1.0-SNAPSHOT with another commit. For us this commit would be rejected by our remote repo since it is not a merge commit.
I am not sure if there was a specific reason for doing it this way.
Possible solution:
If the commit to update the version is is done on the feature branch , and then it merges to develop, the end result will be same but just with a merge commit. So the logic would be , feature-finish > check current develop version and copy it > change the version on feature branch and commit > checkout develop > merge feature branch and commit