user984621
user984621

Reputation: 48453

Git + Heroku: the right workflow

I got the instructions on how to deploy the app to Git and Heroku, but because I am not very familiar with Git (I know just the "basics"), I would like to ask you about a little help. I have downloaded the app from Heroku. Here's what I should to do:

Create separate git branches for new updates, push the branch to Github, create pull requests and merge them into master.
Then pull the master branch locally and deploy to Heroku.

What should be the right workflow? After a research:

git branch new_branch
git push origin new_branch

git fetch new_branch
git merge master/new_branch

git push heroku...

Could you correct me, please, about the workflow?

Thank you

Upvotes: 1

Views: 617

Answers (1)

gulty
gulty

Reputation: 1076

The correct workflow after cloning / pulling your app would be:

git branch new_branch
git checkout new_branch
### Now you can make changes, develop your update
git commit -am "some message"
git push origin new_branch

To merge the branch into the master you can do:

git checkout master
git merge new_branch

And you can push/deploy it whereever you want, for instance heroku in your example. Hope this helps..

Upvotes: 1

Related Questions