我已经创建了我的遥控器上的一个新的分支,所以我希望做到这一点:
$ git fetch && git checkout feature/name
不过,我得到这个错误:
error: pathspec 'feature/name' did not match any file(s) known to git.
当我运行git fetch
自身,它不返回任何东西,我也试着git fetch origin
这也不起作用。
git remote
的回报只是一个远程叫origin
。
我的配置是这样的:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = removed as it is a private repo
fetch = +refs/heads/staging:refs/remotes/origin/staging
[branch "staging"]
remote = origin
merge = refs/heads/staging