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 !
git 删除git远程分支