branch-alias subcommand for git
npm install git-branch-aliasbranch-alias subcommand for git
```
npm i git-branch-alias -g
``
${command}
${command} [ --delete | -d ]
Creates a symbolic reference referring to .
- ${command} is git-branch-alias, git branch-alias or git bralias.
- defaults to the current checked-out branch.
This symbolic reference acts as an alias for , and can be
used in its place. More specifically, it WILL be dereferenced to
its target in nearly all situations, so for any given command you
should treat every usage of as if it were actually .
To safely delete a branch alias, use:
``
${command} --delete
WARNING: These symbolic references appear in your branch list as:
``
and so you might be tempted to try to delete them like a branch:
``
git branch -d
However this can cause problems. In git versions prior to 1.8.0.1 will be dereferenced and you will instead delete the
branch it refers to (git will allow this even if you currently
have that branch checked out), and the symbolic reference will
still remain (referencing a branch which is no longer available).
In later versions of git the will be deleted rather than
the branch; however git will still not check to see whether you
currently have checked out, and will not prevent you${command} -d
from deleting it in that situation. This will leave your HEAD ref
in an invalid state. Using
situation by switching HEAD to
- https://gist.github.com/mauricerkelly/0b12b20a870d1e38081e