如何合并分支的Git推送副本
我这样做:如何合并分支的Git推送副本,git,Git,我这样做: cd /repo1 git clone <remote-repo> git checkout -b mynewbranch <edit1> git add git commit <edit2> git add git commit cd /repo2 git clone <remote-repo> cd /repo1 git checkout master git merge mynewbranch # messages # All
cd /repo1
git clone <remote-repo>
git checkout -b mynewbranch
<edit1>
git add
git commit
<edit2>
git add
git commit
cd /repo2
git clone <remote-repo>
cd /repo1
git checkout master
git merge mynewbranch
# messages
# All merged Ok.
git checkout mynewbranch
git push /repo2 mynewbranch:mynewbranch
cd /repo2
git branch
* master
mynewbranch
git merge mynewbranch
# Tons of merge conflict errors
cd/repo1
git克隆
git签出-b mynewbranch
git添加
git提交
git添加
git提交
cd/repo2
git克隆
cd/repo1
切换到主分支
git合并mynewbranch
#信息
#好的。
吉特结帐mynewbranch
git推送/回购2 mynewbranch:mynewbranch
cd/repo2
吉特分行
*主人
我的新农场
git合并mynewbranch
#大量合并冲突错误
目录repo1和repo2具有完全相同版本和代码分支的克隆git branch-r
在两个目录中也表示相同的内容
在repo1中合并我的分支非常有效。但当我将该分支推到repo2并尝试相同的合并时,会出现合并冲突
我错过了什么?这是否可以正确执行?在这两种情况下,
git branch-r
表示相同的内容,即远程回购参考的名称。