Skip to content

Instantly share code, notes, and snippets.

@ch4nd4n
Created November 6, 2012 13:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ch4nd4n/4024716 to your computer and use it in GitHub Desktop.
Save ch4nd4n/4024716 to your computer and use it in GitHub Desktop.
push to heroku
git init
git add .
git rm -rf spec/ --cached
git commit -m "init"
git remote add heroku git@heroku.com:YOURAPP.git
echo "Added heroku remote"
#pull heroku but then checkback out our current local master and mark everything as merged
git pull heroku master
git checkout --ours .
git add -u
git commit -m "merged with github master"
echo "merged with github"
#push back to heroku, open web browser, and remove git repository
git push heroku master
echo "Now you should check if heroku build is working fine"
# remove heroku .git folder
rm -fr .git
# Go back where we started
echo "Everything Done"
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment