How to merge Git of a pushed copy of a branch
I did this:
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
The repo1 and repo2 directories contain clones of the same version and code branch. git branch -r
says the same thing in both directories.
Merging my branch into repo1 works fine. But when I push that branch on repo2 and try to do the same merge, I get merge conflicts.
What am I missing? Can this be done correctly?
+3
source to share
No one has answered this question yet
Check out similar questions: