这个问题在这里已经有了答案:
如何在本地和远程删除Git分支? 39个答案与主人合并后,我已经移除了一个分支。 但是,本地删除的分支不会在远程仓库上删除(在github上)。
在这里的一个答案建议,我尝试了git push remote :branch似乎没有帮助的git push remote :branch 。 --prune选项似乎也没有帮助。 我想我可以继续远程删除分支,但我不想检查它并跟踪每个分支。
有任何想法吗?
This question already has an answer here:
How do I delete a Git branch locally and remotely? 38 answersI have removed a branch I have after merging it with the master. However, the locally deleted branch is not deleted on remote repo (on github).
On a suggestion in one answer here, I tried git push remote :branch that didn't seem to help. --prune option didn't seem to help either. I think I can go ahead and delete the branch remotely as well, but I don't want to be checking it and tracking with every branch.
Any ideas?
最满意答案
你想用这个...
git push remote --delete <branch-name>虽然git push remote :branch应该已经工作。 该命令说, 推这个分支没有本地集,有效地删除它 。
你确定你的遥控器名称是远程的吗? 它可能是起源吗? 使用git remote -v列出您的遥控器。
否则, 你可以使用GitHub的用户界面删除分支 。
You want to use this...
git push remote --delete <branch-name>Although git push remote :branch should have worked. The command says push this branch without a local set, effectively deleting it.
Are you sure the name of your remote is remote? Could it be origin? Use git remote -v to list your remotes.
Failing that, you can delete branches using GitHub's UI.
更多推荐
发布评论