I was using branches with slashes for some time, but suddenly found that I can't create them in some circumstances
$ git init
Initialized empty Git repository in /home/dimskraft/tests/git-slash-branch/.git/
$ git checkout -b my-branch
Switched to a new branch 'my-branch'
$ git status
On branch my-branch
No commits yet
nothing to commit (create/copy files and use "git add" to track)
$ git checkout -b my-branch/sub-branch
Switched to a new branch 'my-branch/sub-branch'
$ touch myfile.txt
$ git add myfile.txt
$ git commit -m "added myfile.txt"
[my-branch/sub-branch (root-commit) 9be5cc5] added myfile.txt
...
$ git checkout -b my-branch/sub-branch/aaa
fatal: cannot lock ref 'refs/heads/my-branch/sub-branch/aaa': 'refs/heads/my-branch/sub-branch' exists; cannot create 'refs/heads/my-branch/sub-branch/aaa'
$ git status
On branch my-branch/sub-branch
nothing to commit, working tree clean
Why and is it possible to overcome?