git pull之间的区别.大师vs git合并大师 [英] Difference between git pull . master vs git merge master
问题描述
没有远程存储库,只有一个本地存储库有两个分支.
Having no remote repository, just one local repository with two branches.
$ git branch -a
master
* devel
在此上下文中,以下命令是否 相同/同义词?
Are following commands in this context the same/synonym?
$ git pull . master
和
$ git merge master
更新:
$ git help pull
提供以下信息
SYNOPSIS
git pull <options> <repository> <refspec>...
DESCRIPTION
...
Note that you can use . (current directory) as the <repository> to pull
from the local repository — this is useful when merging local branches
into the current branch.
我实际上不明白为什么如本手册页中所述的那样有用.
I actually don't understand why this is useful as mentioned in this manpage.
推荐答案
git pull . master
从当前存储库中获取(无操作),然后将执行某些操作以使当前分支与master
保持最新.某些内容可能是合并,但也可能是重新配置,具体取决于配置设置pull.rebase
或branch.master.rebase
.
git pull . master
fetches from the current repository (a no-op) and will then do something to bring the current branch up to date with master
. That something might be a merge but it might also be a rebase depending on the configuration setting pull.rebase
or branch.master.rebase
.
在合并的情况下,合并策略可能会受到pull.twohead
的影响.
In the case of a merge, the merge strategy my be affected by pull.twohead
.
git merge master
将始终使用默认的合并策略合并master.
git merge master
will always merge master with the default merge strategy.
这篇关于git pull之间的区别.大师vs git合并大师的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!