How to name a (no branch)-branch on git
It happened somehow that I left the
master branch and ended up on the
no branch branch. How can I give this branch a meaningful name?
In detail: Calling
git branch shows
* (no branch) master
and what I want (without changing any file) is to have e.g.
* extraBranchIEndedUpWith master
git status is clean.
One Solution collect form web for “How to name a (no branch)-branch on git”
“no branch” is not a branch, as the name says. It means you have checked out a revision that isn’t the tip of a branch.
To create a branch of it, simply
git checkout -b extraBranchIEndedUpWith
Just like you would create any other branch from your current revision.