Deleting a branch after a pull request is merged
Assuming we are working with a remote tracking branch called testing
- Assuming branch was deleted on remote repo (ex: via GitHub)
this will delete any remote branch that does not exist on the remote repo. —prune is needed since fetch won’t remove branches missing remote counterpart by default
- Assuming change is made locally
will show list of branches that exist on remote
these can be deleted with git push —delete: git push origin --delete testing