如何删除本地git存储库中的远程分支? [英] How can I delete a remote branch in a local git repository?

查看:44
本文介绍了如何删除本地git存储库中的远程分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在进行git提取后,所有远程分支在我的本地git存储库中均显示为远程.

All the remote branches are visible as remotes in my local git repository after a git fetch.

如何在我的本地存储库(而不是远程存储库)中有选择地删除远程分支?

How to selectively remove the remote branches in my local repository (not in the remote repository)?

推荐答案

git branch -r -d remote/branch

您还需要重新配置获取,以避免以后再次获取此分支

You also need to reconfigure fetch to avoid fetching this branch again later

这篇关于如何删除本地git存储库中的远程分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆