简体   繁体   English

如何查看我推送的所有远程分支

[英]How can I see all remote branches pushed by me

I know git branch -r shows all remote branches but I want to see only those that I created using git push .我知道git branch -r显示所有远程分支,但我只想查看我使用git push创建的那些。

It will be a bonus if someone could show how to delete only my remote branches safely.如果有人可以展示如何安全地仅删除我的远程分支,那将是一个奖励。

There is no notion of branch author, but you canlist branches by:没有分支作者的概念,但您可以通过以下方式列出分支:

In short, due to the nature of branches (a pointer to a commit, which can be overridden/deleted at any time), this is not 100% reliable.简而言之,由于分支的性质(指向提交的指针,可以随时覆盖/删除),这不是 100% 可靠的。

See " How do I delete a Git branch locally and remotely? " for deleting a remote branch: you can push a branch deletion.请参阅“如何在本地和远程删除 Git 分支? ”以删除远程分支:您可以推送分支删除。

git push <remote_name> --delete <branch_name>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何查看某些开发人员推送的分支合并到远程服务器中的master中? - How can I see the branches merged into master in remote server, pushed by certain developer? 我怎样才能看到在不同分支中一起推送的提交? - How can I see commit pushed in different branches together? 如何查看git remote中所有过去的分支? - How to see all past branches in the git remote? Git-如何从一个遥控器拉所有分支? - Git - How can I pull all branches from a single remote? 如何获得本地PC上的所有远程分支? - How can I get all the remote branches on local PC? 如何查看所有未推送到远程分支的本地提交? - How to see all local commits which are not pushed to the remote branch? 如何列出所有未在 git 中推送的本地跟踪分支? - How do I list all local tracking branches not pushed in git? 如何将本地git仓库中的所有远程分支转换为本地跟踪分支 - How can I convert all the remote branches in a local git repo into local tracking branches git:所有本地分支都在遥控器后面。 如何将它们全部带到远程状态? - git: all local branches are behind the remote. How can I bring them all up to the remote state? 如何查看哪个 Git 分支正在跟踪哪个远程/上游分支? - How can I see which Git branches are tracking which remote / upstream branch?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM