I'm following the gitflow model for a data science project, and I would like to automatically change the version number inside one file and commit it, after creating a new release branch. The new version name should just be the name of the release branch.
I think the git hook for post-checkout is probably the best option, but I can't understand how to use the arguments it receives to check if the checkout was a branch creation or a checkout to an existing branch, nor how to get the name of the newly create release branch.