I'm trying to denote Git branches from contributing users with the ~
tilde sign similar to the notation used to refer to home folders on UNIX-like operating systems but Git prevents me from doing so in that it aborts branch creation with the error message fatal: '~' is not a valid branch name.
The branch names from contributors should look like ~alice/feature/foo
, ~bob/bugfix/bar
etc.
None of the following commands work with Git version 2.14.1:
$ git checkout -b '~'
fatal: '~' is not a valid branch name.
$ git checkout -b '~bar'
fatal: '~bar' is not a valid branch name.
$ git checkout -b 'foo~'
fatal: 'foo~' is not a valid branch name.
$ git checkout -b 'foo~bar'
fatal: 'foo~bar' is not a valid branch name.
For the moment as an alternate denotation I have decided on the @
at sign as the common prefix for my purposes. But I'm rethinking the decision of making rather unusual characters part of my branch names other than the -
hyphen and _
underscore signs as word delimiters due to possible restrictions that may be imposed by Git itself or the underlying filesystem a Git repository happens to be e.g. checked out and thus stored on.