[英]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:没有分支作者的概念,但您可以通过以下方式列出分支:
master
, and it hasn't been merged to master
yet他们的第一次提交(更接近你所追求的),但是......假设分支是由master
,并且它还没有合并到master
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.