Git-删除远程仓库的分支

2016-9-29 diaba 工具使用

执行以下语句:

git push origin :branch_name


注意:冒号前的空格不能少

理解:把一个空分支push到server上,相当于删除该分支


样例:

diabetic at bogon in ~/git/repository/work/trade (master) 

$ git pull

Already up-to-date.


diabetic at bogon in ~/git/repository/work/trade (master) 

$ git push origin :dev_for_fix_bug

To http://git.domain.iii/java/ftrade.git

 - [deleted]         dev_for_fix_bug

标签: git branch

发表评论:

Powered by emlog 京ICP备15045175号-1 Copyright © 2022