Search code examples
gitrelease-management

Should version be bumped in a merge commit?


I am using git branching model described in this post.

In case the version number is included in code (like in rubygems), in which commit should I change the number? I suppose not feature branch, since a release version somehow belong to master branch.

BTW If it should be changed in a merge commit, are there some command to modify the contents before merge actually happens?


Solution

  • Read the article through, it's explained.

    The version changes just before you merge back into master, via a release- branch.

    There are no actual commands for this, but I can imagine a simple bash script that'll alter the content of the file in a specific place to change the version number only.