没有参数的 Git pull?

标签 git version-control

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 by git branch --track.

关于没有参数的 Git pull?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26895908/

相关文章:

c# - 在多个项目之间共享通用代码

version-control - Mercurial 问题如何处理不同的头

git - 如何在所有 git 消息提交中更改特定字符串?

git - "git blame"文件访问控制修饰符

macos - 提交时如何在 vim 中获得 git diff 着色?

git - 如何 merge 两个 Git 存储库?

Android Studio 中的 Git 消失了?

git - 如何获取有效的 git-config 值及其来源?

git - 如何在循环中运行 svn update 以将提交导入到 git?

git - 我是否需要在 Git 中提交,何时应该这样做,以及如何恢复到旧版本?