Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to delete a branch on heroku

I am using heroku to host my application. With merges and rebases i got 2 different stages of my app.

Local master is different from master on heroku.

pushing to heroku master failed with:

 ! [rejected]        master -> master (non-fast-forward) 
 error: failed to push some refs to '[email protected]:xxxxx.git'             
 Merge the remote changes (e.g. 'git pull') before pushing again.  See the    
 'Note about fast-forwards' section of 'git push --help' for details.                                                                                 

is there a way to delete the heroku master? then i can push it again to heroku master..

like image 719
bulleric Avatar asked May 25 '12 14:05

bulleric


1 Answers

You can force push

git push --force origin master

That will overwrite remote master.

You can also delete remote branch by doing this

git push origin :master

Note the colon before branch name. This command says "take void from local machine and put this instead of remote branch 'master'"

like image 82
Sergio Tulentsev Avatar answered Oct 18 '22 15:10

Sergio Tulentsev