Git, you tricky bastard.
Let’s say I first create a branch named ‘wip/foo’:git branch wip/foo
Git will create a file named ‘foo’ in the folder .git/refs/head/wip/. Now, suppose I attempt to create a new branch named ‘wip/foo/foo-offshoot’. git will return an error:error: unable to create directory for .git/refs/heads/wip/foo/foo-offshoot fatal: Failed to lock ref for update: No such file or directory
via coderwall.com : establishing geek cred since 1305712800.
One thought on “A caution about git branch names with ‘/’s”
I experienced the same and solved it by adding something like “/_” to each branch (in your case the branches would be named “wip/foo/_” and “wpi/foo/foo-offshot/_”).
I also add extra folder structure to the repository itself. The top folders contain two folders: “meta” and “repo”, so meta-data I want to store along doesn’t interfere with the “real” data.