views:

429

answers:

2

Ok, so I have a big github project that i'm not supposed to merge my little Stacia branch into. However, it seems like Heroku only takes pushing MASTER seriously. It looks like I pushed my branch, but for example if I only have my branch, it even acts like there's no code on the server. I can't even get my gems installed since the .gems file is on my branch.

Basically I don't even want Heroku to know there's a master. I just want to use my test Stacia branch. But it keeps ignoring my local branch. Is there a way to do this? And again, I don't want to overwrite anything on the main Github repository (eeek!) but it would be ok probably if I had both master and my branch on heroku and merged them there.

I am a total git novice (on windows no less) so please bear with me.

+2  A: 

The first step is make sure you have rebase your local branch on top of its master (Let's suppose it is in its repo 'mainGitHubRepo')

git fetch mainGitHubRepo master
git checkout -b mainGitHubMaster mainGitHubRepo/master

Then go back to your branch and replay it on top of mainGitHubMaster :

git checkout Stacia
git rebase mainGitHubMaster

After that, you can push your branch to your GitHub fork, and then make a pull request.

Note: if you have your own fork on GitHub, you could work directly on 'master' for this fork, meaning your pull request would come from a 'master' branch, enhancing your chances to be considered.
But the aforementioned process remains valid: your pull request must result in trivial merges for the one who will integrate your changes, hence the rebase step to be made locally.

VonC
+3  A: 

If you want to push a different branch to Heroku you can do something like

git push heroku yourbranch:master
David Dollar