git svn - Branch name starting with '-' in git -


i moving svn git using git-svn, , of branches names started '-'. form this question , this migration documentation able pass parameters starting '-'. on creating branch git returns error stating:

fatal: '-closed-mybranch' not valid branch name.

i using gitlab. command running create branches is:

git for-each-ref refs/remotes | cut -d / -f 3- | grep -v @ | while read branchname; git branch -- "$branchname" --"refs/remotes/$branchname"; git branch -r -d -- "$branchname"; done 

this articles explains legal branch names , think branch name legal. can tell me problem be?

ps: branch name not starting '-' imported.

it doesn't seem can create branch name starts dash:

$ git branch "-test" error: unknown switch `e' 

it apparently thinks i'm trying set git branch option -t, , gives error on following e.

it doesn't work command:

$ git checkout -b "-test" fatal: '-test' not valid branch name. 

in case says -test not valid branch name. it's best if change branch names won't start dash.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -