运行 git pull 命令拉主时:
$ git pull ds master
Run Code Online (Sandbox Code Playgroud)
(注意:ds 是远程仓库的别名。)
它弹出以下错误:
fatal: couldn't find remote ref master
Run Code Online (Sandbox Code Playgroud)
但是当为分支 'v1' 运行 'git pull' 时,它可以工作。
$ git pull ds v1
From https://github.com/<UserName>/<Repo's name>
* branch v1 -> FETCH_HEAD
Already up to date.
Run Code Online (Sandbox Code Playgroud)
我想知道这是否是案例问题,但这不是因为我运行以下命令来确认它:
$ git branch -a
master
* v1
remotes/ds/v1
Run Code Online (Sandbox Code Playgroud)
有什么问题?谢谢!