使用受限分支克隆后更改 git(-svn) 中的远程跟踪分支
当将远程分支限制为 2 或 3 个列表(编辑 .git/config,如 {^1} 中所示)、重新获取、垃圾收集和清理所有“refs”目录时,我仍然可以获得所有远程分支的完整列表 < code>git Branch -avv {^2}
我希望将 v2 和 v3 仅视为远程分支列表中的分支。 有什么想法如何解决这个问题吗?或者这是呈现我们可能使用或不使用的所有远程分支的“git 方式”?
{^1}
[svn-remote "svn"]
url = https://example.com/svn/repos/MyRepo/SubPath
fetch = trunk:refs/remotes/trunk
branches = branches/{v2,v3}:refs/remotes/*
{^2}
* master 1234 [trunk: ahead 1] last msg master
remotes/v1 2345 last msg svn branch v1
remotes/v2 3456 last msg svn branch v2
remotes/v3 4567 last msg svn branch v3
remotes/v4 5678 last msg svn branch v4
remotes/trunk 6789 last msg svn trunk
When restricting remote branches to a list of 2 or three (editing the .git/config as seen in {^1}), refetching, carbage collectioning and cleaning all "refs" directories I still get a full list of all remote branches with git branch -avv
{^2}
I expected to see v2 and v3 only as branches in the list of remote branches.
Any ideas how to fix this? Or is that the "git way" to present all remote branches either we might work with or not?
{^1}
[svn-remote "svn"]
url = https://example.com/svn/repos/MyRepo/SubPath
fetch = trunk:refs/remotes/trunk
branches = branches/{v2,v3}:refs/remotes/*
{^2}
* master 1234 [trunk: ahead 1] last msg master
remotes/v1 2345 last msg svn branch v1
remotes/v2 3456 last msg svn branch v2
remotes/v3 4567 last msg svn branch v3
remotes/v4 5678 last msg svn branch v4
remotes/trunk 6789 last msg svn trunk
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)