Skip to contentSkip to conversation

Branch name with space

DISCUSSION Le 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

Le

author
#0 lore raw

Hi, there,

I tried to rename a branch to a new name with space in it. It complained :
git-branch -M 'test 1' or test\ 1
fatal: Invalid branch name: refs/heads/test 1

Is there a way the get round this problem?

Thanks!

Le

#1 lore raw
Quoted 5 lines · Le

I tried to rename a branch to a new name with space in it. It complained :
git-branch -M 'test 1' or test\ 1
fatal: Invalid branch name: refs/heads/test 1

Is there a way the get round this problem?

Don't put spaces in branch names. They aren't permitted. Use an underscore ('_') or a hypen ('-').

Signature · 1 line
Shawn.