Pushing a non-master branch to Heroku

Posted on

I completed a React project with a Rails API backend. Locally everything worked prefectly.  When trying to change environment variables like the address of the API backend, I wanted to create a seperate branch for heroku, it case I needed to edit something for heroku. I would rather not clutter “master” with changes until they are 100% working.

Problem is heroku only recognizes master branches, but to test I need to commit to master

Well there is a work aorund, just push a different branch up to heroku manually

git push heroku [name-of-your-branch]:master

this way I can push up a branch I named heroku up to heroku.

Credit: link from Jordon Trevino


Github markdown create links to sections in same md file

Posted on

tldr:    [Link text or description](#this-is-my-header-name-I-want-to-link-to)

I had a long Readme file, and wanted easy access on top to the sections of the file.

If you have a header, you can link to that header

create a header: ##This is my header
the link to the header would be: [Link text or description](#this-is-my-header)

As you can see its just converting your text to lowercase and using dash instead of spaces.

If you are having a problem, you can always highlight the header and the link will show at the bottom of chrome. See how that python looking object showed up next to  “Examples”, and at the bottom is the full hyerlink. In this example, just the #example would suffice as I did in my example  above

Screen Shot 2018-06-02 at 6.38.44 AM

Cannot push commit to github :

Posted on


hint: Updates were rejected because the remote contains work that you do

hint: not have locally. This is usually caused by another repository pushing

hint: to the same ref. You may want to first integrate the remote changes

hint: (e.g., ‘git pull …’) before pushing again.

hint: See the ‘Note about fast-forwards’ in ‘git push –help’ for details.

hint: Updates were rejected because the remote contains work that you do


git push -f origin master

forcing an update isn’t ideal but all the commits were on my local machine and I am the only one with access to the repository. Possible the error occurred due to network issue earlier?  Else I would git pull, and then go through the diffs