小编hdo*_*mos的帖子

如何设置只从远程获取一些分支

我在 git 中有 Moodle 项目,并且希望不断从原始 git 存储库进行更新。然而它有很多活跃的分支,我只需要其中两个。我可以在 gitconfig 文件中设置为仅获取我需要的两个分支而忽略其他分支吗?我有 gitcofig 文件的这一部分,只是不知道如何正确设置。

[remote "Moodle"]
url = git://git.moodle.org/moodle.git
fetch = +refs/heads/*:refs/remotes/Moodle/*
Run Code Online (Sandbox Code Playgroud)

git branch git-config

5
推荐指数
1
解决办法
1082
查看次数

标签 统计

branch ×1

git ×1

git-config ×1