Heya,
The functionality of `git checkout -` is very useful, and I am hopeful
that `git merge -` will eventually land, as it matches my workflow well
as well. However, the porcelain is not entirely consistent about
forbidding '-' as a ref name:
~/tmp $ git init
Initialized empty Git repository in /home/chmrr/tmp/.git/
~/tmp (master #) $ git commit --allow-empty -m 'First commit'
[master (root-commit) b7402ef] First commit
~/tmp (master) $ git checkout -b other
Switched to a new branch 'other'
~/tmp (other) $ git checkout -
Switched to branch 'master'
~/tmp (master) $ git checkout -b -
fatal: git checkout: we do not like '-' as a branch name.
~/tmp (master) $ git tag -
~/tmp (master) $ git tag -l
-
~/tmp (master) $ git checkout -
Switched to branch 'other'The likely best fix is to disallow '-' as a tag name, as well, which
would be handy because the typo of leaving off the 'l' on '-l', for
example, which is not an uncommon mistake that I have seen.
- Alex