by hueving · 11y ago · 0 comments
Can you elaborate on this? What you said doesn't make much sense. If having a slash in the branch name creates path conflicts, that means slashes are treated specially, right? How exactly does someone 'know what they are doing' to be able to use them?
$ git branch fireos
$ git branch fireos/feature-branch
error: unable to create directory for .git/refs/heads/fireos/feature-branch
fatal: Failed to lock ref for update: No such file or directory
This happens because creating 'fireos' branch stores the sha1 in file .git/refs/heads/fireos. But if you later want to create branch 'fireos/feature-branch', git needs to store the sha1 in .git/refs/heads/fireos/feature-branch. This is impossible because 'fireos' is a file and cannot be a directory. Path conflict.But its a global policy so "wp" and "wp/BTS-number" will always be a folder, and conflicts should never happen.