Typically a human user checks out the branch that becomes the root of the new branch, and then a simple git branch new_branch
is all that is needed. Not every starting point is a branch. I pass the extra argument most often when creating a branch from a tag, or a different commit than HEAD.
You can check out a tag. Git just informs you that you are in a detached state — HEAD does not point to the tip of a branch. You can certainly git branch new_branch
from a detached HEAD, but this is not a natural workflow for most people. People tend to check out branches more often.
Another use case for the extra argument is one I use often when writing experimental code. I will create a branch to experiment with something. Several commits in I realize I've created complete and utter garbage. I might decide to create a new branch based on a previous commit in my experimental branch.
The last use case I can think of is an automated process or shell script. You might need to create a new branch in a script from an arbitrary commit as part of a continuous integration build.
Git needs to know the base of every new branch, and that is the purpose of the extra argument. I would say that not specifying the extra argument and assuming the new branch is created from HEAD is a convenience feature. The extra argument isn't really extra. It is required, but git intelligently assumes "the tip of the current branch" if omitted.