现在这些是我的树枝:
WalnutiQ> git branch -a
* develop
feature-model_in_javascript
master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/feature-model_in_javascript
remotes/origin/master
我的目标是删除javascript中的分支功能模型,因此我尝试:
WalnutiQ> git branch -d feature-model_in_javascript
Deleted branch feature-model_in_javascript (was 4604f04).
所以现在当我检查我的分行时我得到:
WalnutiQ> git branch -a
* develop
master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/feature-model_in_javascript # <== HOW DO I DELETE THIS????
remotes/origin/master
如何删除远程分支?我通过单击https://github.com/WalnutiQ/WalnutiQ/branches
最佳答案
如果已经手动删除上游服务器上的分支,则使用
git fetch -p
来“修剪”你的远程跟踪分支。在服务器上不再存在的
remotes/origin
下的任何分支都将从本地存储库中删除。关于git - 如何使用git删除本地和远程分支,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24154380/