remove branch not published yet

C++
git push <remote_name> --delete <branch_name>First checkout another branch
	git checkout <other branch> 

Now delete branch
	git branch -D <deleting brach>$ git branch -r | egrep -v -f /dev/fd/0  <(git branch -vv | grep origin) | xargs git branch -d
Source

Also in C++: