Using the slash character in Git branch name

后端 未结 6 1036
孤城傲影
孤城傲影 2020-11-22 11:28

I\'m pretty sure I saw somewhere in a popular Git project the branches had a pattern like \"feature/xyz\".

However when I try to create a branch with the slash chara

6条回答
  •  星月不相逢
    2020-11-22 12:07

    Sometimes that problem occurs if you already have a branch with the base name.

    I tried this:

    git checkout -b features/aName origin/features/aName
    

    Unfortunately, I already had a branch named features, and I got the exception of the question asker.

    Removing the branch features resolved the problem, the above command worked.

提交回复
热议问题