'git pull origin master'与'git merge master'有区别吗? [英] Does 'git pull origin master' has difference with 'git merge master'?
问题描述
由于该场景非常具体,因此,我认为我必须发布一个新问题.
Due to the scenario is quite specific, so, I think I have to post a new question.
假设我有2个分支,分别名为"master"和分别是"A".
Assuming that I have 2 branch named 'master' & 'A' separately.
方法A:在分支A中,使用 git pull origin master
然后解决冲突
Approach A:
In branch A, use git pull origin master
then resolve conflicts if any
方法B:在分支母版中,使用 git pull
从远程提取最新更改,然后 checkout A
分支到A,使用 git merge master
然后解决冲突(如果有).
Approach B:
In branch master use git pull
to pull latest changes from remote,
then checkout A
to branch A, use git merge master
then resolve conflicts if any.
以上两种方法的结果是否相同?
Are these both approaches above has same result?
推荐答案
Git pull同时包含访存和合并.因此,我不确定您在问什么.
Git pull contains both fetch and merge.so i am not sure what is you asking.
git pull = git fetch + git merge
请阅读此文档 https://git-scm.com/docs/git-pull
这篇关于'git pull origin master'与'git merge master'有区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!