无法签出连字符( - )开始的git分支 [英] Can't checkout git branch started with hyphen (-)
问题描述
我克隆了一个git仓库。
这个仓库有一个类似于 -feature-abc
的远程分支。
当我输入 git checkout -feature-abc
时,我得到:
error:unknown switch`e'
任何想法如何检出此分支?
最后,我能够基于VonC的答。
解决方案1: 解决方案2: I have cloned a git repository. Any idea how to checkout this branch? Finally I am able to get things working based on VonC's Answer. Solution 1: Solution 2:
Make an existing Git branch track a remote branch? 这篇关于无法签出连字符( - )开始的git分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
$ b git checkout -b feature-abc origin / -feature-abc
.git / refs / remotes / origin
,
-feature-abc
的文件,
cat
文件),
git checkout {hash}
git checkout -b功能abc
git分支--set-upstream-to = origin / -feature-abc功能-abc
This repository has a remote branch something like -feature-abc
.
When I type git checkout -feature-abc
, I get:error: unknown switch `e'
git checkout -b feature-abc origin/-feature-abc
.git/refs/remotes/origin
, -feature-abc
", cat
the file), git checkout {hash}
git checkout -b feature-abc
git branch --set-upstream-to=origin/-feature-abc feature-abc