`git merge origin master` 和 `git merge origin/master`的区别在哪里?
黄舟
黄舟 2017-04-24 16:00:59
0
1
1001

git merge origin mastergit merge origin/master的区别在哪里?

通过试验,我没有找到他们的区别。看起来又好像有去区别。

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
淡淡烟草味

git merge branchA branchB, branchB generally defaults to the current branch, so

git merge origin master //将origin merge 到 master 上
git merge origin/master //将origin上的master分支 merge 到当前 branch 上 

Generally when performing a merge operation, it is best to first checkout to the branch you want to perform the merge operation, that is, branchB, and then proceed

git merge branchA //默认为当前branch,即branchB

Because you cannot ensure whether a confit is generated, checkout to branchB first.
In addition, to be on the safe side, you can create a backup branch before merging

git checkout -b branchB_backup

This way, even if something uncontrollable happens after you merge, you can still check back.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template