I know git branch -r
shows all remote branches but I want to see only those that I created using 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
yetIn 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.
See "How do I delete a Git branch locally and remotely?" for deleting a remote branch: you can push a branch deletion.
git push <remote_name> --delete <branch_name>