English 中文(简体)
有没有一种方法可以删除高雄上的分支 。
原标题:Is there a way to delete a branch on heroku

我用花木书来主持我的应用程序。 随着合并和重设, 我得到了两个不同的应用程序阶段 。

当地师傅和中数大师不同

推向 Exmoku 主机失败 :

 ! [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..

最佳回答

你可以强迫推

git push --force origin master

这将覆盖远程主人。

您也可以这样做删除远程分支

git push origin :master

注意分支名称前的冒号。 此命令写着“ 从本地机器上脱空, 而不是从远程分支母版中将其放置 ” 。

问题回答

就我而言,我将Heroku上的分支从master 改为main ,我想删除旧的master 分支。如果我直接删除Heroku上的远程 master 分支,它将被拒绝。

我找到工作的唯一方法就是根据

假设您的应用程序名称为 my-app 。 您可以重设

heroku plugins:install heroku-repo
heroku repo:reset --app=my-app

注意, 这将删除 Heroku 中的所有分支 。 所以您需要再次按住 Heroku 。

git push heroku main




相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签