本地删除的分支未在远程存储库上删除[复制](Locally deleted branch is not deleted on remote repository [duplicate])

编程入门 行业动态 更新时间:2024-10-28 10:25:36
本地删除的分支未在远程存储库上删除[复制](Locally deleted branch is not deleted on remote repository [duplicate])

这个问题在这里已经有了答案:

如何在本地和远程删除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 answers

I 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.

更多推荐

本文发布于:2023-07-26 06:54:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1272211.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分支   deleted   Locally   branch   repository

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!