After cloning from remote git repository (at bettercodes) I made some changes, commited and tried to push:
git push origin master
Errors
Aside from the many answers already supplied to this question, a simple check on the local repo branches that exist in your machine and those that don't in the remote, will help. In which case you don't use the
git prune
command as many have suggested.
Simply delete the local branch
git branch -d
as shown in the attached screenshot using -D to force delete when you are sure that a local branch does not have a remote branch tracked.