git 删除git远程分支_如何删除git远程分支

git 删除git远程分支

Keeping a tidy repository is important; not just a tidy codebase, but a tidy repository in as far as not having spare branches rotting around.  Generally the main repository doesn't keep multiple branches but sometimes you need to push to a main repository simply to get Travis CI to run tests.  Once a branch is merged, for example, we no longer need it around.

保持整齐的存储库很重要; 不仅是一个整洁的代码库,还包括一个整洁的存储库 ,以至于没有多余的分支出现。 通常,主存储库不会保留多个分支,但有时您仅需推送到主存储库即可让Travis CI运行测试。 例如,合并分支后, 我们就不再需要它

Deleting a branch on a local host machine repo is easy:

删除本地主机存储库上的分支很容易:


git branch -d <branch_name>


To remove a branch from the remote git repository, like a GitHub-hosted repository, you can execute:

要从远程git存储库(例如GitHub托管的存储库)中删除分支,可以执行:


git push <remote_name> --delete <branch_name>


If you learned something here, check out Delete Merged Branches with git!

如果您在这里学到了一些知识,请使用git删除Delete Merged Branches

翻译自: https://davidwalsh.name/delete-git-remote-branch

git 删除git远程分支

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值