I often accidentally checkout remote tracking branches incorrectly:
git checkout -b origin/fixbugs
The -b
should be a -t
.
This mistake creates a branch called "origin/fixbugs". How could I get git to give me an error instead of creating this branch when the branch name begins with "origin/" (or any other remote name)?