Reputation: 2202
I am trying to ensure that my Heroku master branch is up to date with my latest commit. Over time I have been pushing to Heroku, however it seems these pushes have been ended up as 'new' branches in Heroku remote, as opposed to being merged with Heroku master branch which is what I would like to have been doing. Here is what git remote show heroku
returns:
* remote heroku
Fetch URL: https://[email protected]/HB/hbapp.git
Push URL: https://[email protected]/HB/hbapp.git
HEAD branch: master
Remote branches:
frontend new (next fetch will store in remotes/heroku)
james new (next fetch
jes_fix_duedil_empty_address tracked
master tracked
Local refs configured for 'git push':
james pushes to james (fast-forwardable)
master pushes to master (up to date)
Could you help me to achieve the following please:
git diff heroku frontend..master
, but that doesn't work.git fetch heroku jes_fix_duedil_empty_address
and I can see that this set that branch from 'new' to 'tracked', but it still has not merged these changes to heroku master branch.git push heroku master
but so that the push merges to heroku master as opposed to createing a 'new' heroku remote branch which is what this seems to have been doing previously for me (i.e. I don;t ever want any other Heroku branches apart from Master, all branch merging to master will be done on origin and then origin master pushed to heroku master)?git remote -v
returns:
heroku https://[email protected]/HB/hbapp.git (fetch)
heroku https://[email protected]/HB/hbapp.git (push)
origin https://[email protected]/HB/hbapp.git (fetch)
origin https://[email protected]/HB/hbapp.git (push)
and git br
returns:
james
* master
and git push heroku master
returns:
Everything up-to-date
when i know that it is not, in the sense that local code is not on heroku master.
Thanks for the help.
Upvotes: 0
Views: 638
Reputation: 119
TLDR : The remote url for heroku is pointing on the bitbucket git repo.
Simply changing the url using git remote set-url heroku https://git.heroku.com/HEROKU_APP.git
and pushing again on heroku should deploy the app
Do it locally. When you push a random ( not master ) branch to heroku, it's not deployed and has no real utility. Let say you pushed master:dff52a15 on heroku, you commit some new stuff on master and some other stuff on another branch you'd like to deploy. You can see the diffs locally by doing a simple git diff dff52a15
git push heroku :mybranch
will delete mybranch on heroku, however, there is no need to do so.
I think your better option is to do the required merge in a local branch then deploy this branch on heroku by doing a git push heroku local_branch:master
You can delete your local_branch afterward
Upvotes: 1