gitversion-controlgit-tfs

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.

It will be a bonus if someone could show how to delete only my remote branches safely.


Solution

  • 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.

    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>