gpt4 book ai didi

git - 撤消 git remote 上的设置分支

转载 作者:太空狗 更新时间:2023-10-29 14:03:50 25 4
gpt4 key购买 nike

我目前已经设置了我的 git remote 来限制获取哪些分支:

git remote set-branches myOrigin myBranch

这会将正确的条目添加到 .git/config:

[remote "myOrigin"]
fetch = +refs/heads/myBranch:refs/remotes/myOrigin/myBranch

现在我想撤消这个,回到默认配置:

[remote "myOrigin"]
fetch = +refs/heads/*:refs/remotes/myOrigin/*

如何在不手动修改我的 .git/config 的情况下执行此操作?有没有我可以运行的 git 命令?

最佳答案

只需使用引号:

git remote set-branches myOrigin '*'

关于git - 撤消 git remote 上的设置分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47726087/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com