I created a branch called \'6796\', then I pushed it to remote, checked it out on another machine, made other edits, pushed it, then merged it with the master, and deleted it -
I had the same issue. But in my case it was due to my branch's name. The branch's name automatically set in my GitHub repo as main instead of master.
git pull origin master (did not work).
I confirmed in GitHub if the name of the branch was actually master and found the the actual name was main. so the commands below worked for me. git pull origin main
You also have to delete the local branch:
git branch -d 6796
Another way is to prune all stale branches from your local repository. This will delete all local branches that already have been removed from the remote:
git remote prune origin --dry-run
I have same error. Problem was that branch was deleted, released. But in PhpStorm I still could see it in remote branches. I could checkout as local branch. And then doing git pull was giving this error.
So need to check if this brnach really exists remotely.