ฉันกำลังพยายามลบสาขา git ระยะไกลด้วย
git push origin :my_remote_branch
และรับ:
error: unable to push to unqualified destination: my_remote_branch
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'git@example.com:/myrepo'
นี่คือสาขาปัจจุบันของฉัน
git branch -a
* develop
master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/my_remote_branch
git branch -r --merged
origin/HEAD -> origin/master
origin/develop
origin/master
ความคิดเห็นใด ๆ เกี่ยวกับวิธีกำจัดสาขานี้จะได้รับการชื่นชม
git fetchแต่นั่นไม่ได้ช่วย จะพยายามค้นหาวิธีแก้ปัญหาที่ตรงไปข้างหน้ามากขึ้นก่อนที่จะพยายามลบไฟล์ด้วยตนเอง
git fetch -pเพื่อกำจัดกิ่งติดตามค้าง
git fetchเพื่อดูว่าแก้ไขชื่อระยะไกลที่ไม่มีอยู่หรือไม่? คุณลองเข้าไปใน.git\refs\remotes\originแล้วลบmy_remote_branchไฟล์เพื่อดูว่ามันเพียงพอหรือไม่