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

前端 未结 9 1051
醉话见心
醉话见心 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:27

    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

提交回复
热议问题