如何在本地和遠程刪除Git分支? - How do I delete a Git branch locally and remotely?

問題:

I want to delete a branch both locally and remotely. 我想在本地和遠程刪除分支。 git

Failed Attempts to Delete Remote Branch 嘗試刪除遠程分支失敗

$ git branch -d remotes/origin/bugfix
error: branch 'remotes/origin/bugfix' not found.

$ git branch -d origin/bugfix
error: branch 'origin/bugfix' not found.

$ git branch -rd origin/bugfix
Deleted remote branch origin/bugfix (was 2a14ef7).

$ git push
Everything up-to-date

$ git pull
From github.com:gituser/gitproject
* [new branch] bugfix -> origin/bugfix
Already up-to-date.

What should I do differently to successfully delete the remotes/origin/bugfix branch both locally and remotely? 爲了成功地在本地和遠程刪除remotes/origin/bugfix分支,我應該採起什麼措施? github


解決方案:

參考一: https://stackoom.com/question/8PCb/如何在本地和遠程刪除Git分支
參考二: https://oldbug.net/q/8PCb/How-do-I-delete-a-Git-branch-locally-and-remotely
相關文章
相關標籤/搜索