threads / discuss / 16562

Branch name with space

Subject: Branch name with space

## tl;dr

2 messages between Dec 2, 2008 and Dec 2, 2008.

replies: 1people: 2as markdown or json

Le· Dec 2, 2008, 17:34 UTC · lore
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
Shawn O. Pearce· Dec 2, 2008, 18:03 UTC · re: Le · lore

Re: Branch name with space

Le <le_wen@distributel.ca> wrote:
Show 5 quoted lines
> 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.

← back to recent threads