Pregunta

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 ?

¿Fue útil?

Solución

@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

Otros consejos

As @Vii indicated:

git checkout -b betamaster --track beta/master
git merge master
git push betamaster:master
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top