Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push to heroku from another local branch

I have 2 branches: development, some_other_name. I've pushed some_other_name branch which is sub branch of development to heroku, i tested my code and then switched to development, did some code change in dev branch, but when i tried to push it to heroku i got next:

To [email protected]
 ! [rejected]        development -> master (non-fast-forward)
error: failed to push some refs to '[email protected]'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and merge the remote changes
hint: (e.g. 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Which means that i have to merge my some_other_name branch into development. Is there any way to not merge these branches, but push only development instead?

like image 246
sanny Sin Avatar asked Dec 03 '25 02:12

sanny Sin


1 Answers

Yes, you can do it with --force option when pushing to heroku.

$ git push -f heroku development:master

like image 195
Nick Kugaevsky Avatar answered Dec 04 '25 15:12

Nick Kugaevsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!