Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
hotfix: Why do we have to give branch name using finish? #152
I'm starting to use Gitflow this month and so started to use hotfix and feature option of gitflow.
About feature, as we can create many at the same time, I very understand why we have to give the feature name, but for hotfix, as we can't have more than one at the same time, why do we have to give the branch name?
Here is the scenario:
Then if I try to create another hotfix:
Until here, everything is fine. Now I try to stop the unique hotfix that I've created:
Am I right or is there something I forgot ?
Not sure if I am correct in my understanding, but I would think you would assign a new release version after you complete a hotfix. The < version > it is requesting in the error message isn't a branch name as the issue title says, but the name of a tag to give the hotfix-ed version when you commit it back into the production branch. There is no point in having two hotfix branches open for a single version, as they are designed to be shortlived . You may want to explore the use of the gitflow support option if you want to support more than one released version and make hotfixes simultaneously to both.
Have you tried passing the < version > or < base > parameters to the git flow hotfix start command btw (as indicated in the help messages that appear on the terminal)? Where < version > is the name of a tag that you have performed a release on on your production branch, or < base > as the commit hash.
Thank you for your answer, but I am not sure too if I am correct in my understanding.
When I give a version like this:
Then I got:
Because the or <branch_name> is
In my understanding, gitflow is really requesting branch name, like for feature for example.
It create an
hotfix is assuming you named your branch as a version, like 1.2 instead of test. Since you named it "FixSearch" you should instead do
I created an alias for
@six8 Thank you! That's a good starting point, and I will fix my issue with a the kind of hack, but I think that this issue is more a behavior issue.
Maybe the hotfix option has been implemented like all other options (feature, support, ...), so with a parameter to the finish command, where it is not needed.
To fix the destiny of this issue, I think that @nvie should define if my issue report is valid (and has to be implemented like for example change the hotfix finish command in order to set the parameter as optional) or invalid (then I will close it).