Branch name with space

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Branch name with space

From: Le <hidden>
Date: 2016-06-15 22:45:43

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

Re: Branch name with space

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:43

Le [off-list ref] wrote:
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 ('-').

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help