Some advice needed on the best way to go about the following scenario:

I have a branch "master" which my production site runs on (in this
case, using git for a web app).

I have a branch "testing" where I create new features and which my
development site runs on.

Both of these branches reside in an online public repository. The
development test site pulls from the 'testing' branch in the online
repository. (I also test on my own computer, but I also have a
development test jail that's identical in setup to the production site
jail so I can make sure that it runs correctly under the same

I push my 'testing' branch to the online repository, for a final test
on my development site.

Once I'm satisfied, I merge it into my 'master' branch, and push that
branch to the online repo.

My question is about the merge. I currently have to do:

(I'm on branch 'testing'.)

$ git stash save current (maybe I have something else going on right
$ git checkout master
$ git merge testing
$ git push
$ git checkout testing
$ git stash pop current

That works, but it's so many steps that I feel I must be doing
something wrong (I have a script that does it with a single command,
but still...). What I would like to do is to be able to merge all the
commits from 'testing' into 'master' without having to checkout master
first and then go back to my 'testing' branch. In other words a sort
of "push-merge" instead of "pull-merge". Is that possible? Is there
another way I should be doing this? I've read through the git docs but
couldn't find a better scenario though I probably missed something.

Thanks for the advice.
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to