git pull displays “fatal: Couldn't find remote ref refs/heads/xxxx” and hangs up

前端 未结 9 900
醉话见心
醉话见心 2021-01-31 06:58

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 -

9条回答
  •  醉话见心
    2021-01-31 07:33

    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
    

提交回复
热议问题