git pull origin foo
它只会获取并 merge 分支 foo。但是当你运行时会发生什么
git pull
没有任何论据?
最佳答案
git pull
没有任何参数默认为当前 checkout 的分支和它设置为跟踪的远程存储库。
The manual page for git pull不是 super 用户友好但是:
Incorporates changes from a remote repository into the current branch.
Default values for
<repository>
and<branch>
are read from the "remote" and "merge" configuration for the current branch as set bygit branch --track
.
关于没有参数的 Git pull?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26895908/