show all branches remotes and local
git branch -a
show last commit for each branch
git branch -vv
if a branch has the gone flag, the remote was removed. Example:
[origin/<branch>: gone]
You can get all branches with state gone with:
git branch -vv | grep ': gone'
Check if branche are delete on remote
git fetch --prune
If you have local copies of this branches, search them with help of the gone flag and remove them with:
git branch -d
or force deletion of unmerged branches with git branch -D
comment:
git branch -d
only deletes merged branches. This way it is relativly safe your not deleting any work.
show all unrefrenced objects which are effected when deleting by git prune:
git prune --dry-run