Question

I have two remotes to my git repo.

origin/master
origin/develop
beta/master
beta/develop

my origin/develop is 2 commits above the beta/master.I want to merge these two commits on beta/master and push to beta.But when I do >git merge beta/master origin/develop,it gives everything upto date.While I see with git log beta/master,it doesn't have those commits.

How do I merge these branches ?

Was it helpful?

Solution

@Robin Green's answer is almost correct, but you need to specify the remote branch name, plus you don't need to create a temporary branch:

git checkout beta/master
git merge master
git push beta HEAD:refs/heads/master

OTHER TIPS

As @Vii indicated:

git checkout -b betamaster --track beta/master
git merge master
git push betamaster:master
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top