git filter-repo: 可以在特定分支上使用吗?
git filter-repo: can it be used on a specific branch?
我正在阅读 git filter-repo
可以做什么,因为我想用它做一个小实验....我有这个 repo,我只想从中获取一个目录的历史记录,比如说.... 主人..... 但我不想在主人身上工作。我想创建一个新分支,比如 filter-repo-test
并让 git filter-repo
运行 单独在这个分支上发挥作用。我正在阅读手册,但看不到仅指定给定分支的选项。可能吗?
没关系,我刚找到它。它就在我的眼皮底下。它定义为 --refs
'Miscellaneous Options'包括--refs
--refs
Limit history rewriting to the specified refs. Implies --partial
.
In addition to the normal caveats of --partial
(mixing old and new history, no automatic remapping of refs/remotes/origin/*
to refs/heads/*
, etc.), this also may cause problems for pruning of degenerate empty merge commits when negative revisions are specified.
并且...它会移动标签,正如我在“”中记录的那样,它确实使用 --refs
作为示例。
我正在阅读 git filter-repo
可以做什么,因为我想用它做一个小实验....我有这个 repo,我只想从中获取一个目录的历史记录,比如说.... 主人..... 但我不想在主人身上工作。我想创建一个新分支,比如 filter-repo-test
并让 git filter-repo
运行 单独在这个分支上发挥作用。我正在阅读手册,但看不到仅指定给定分支的选项。可能吗?
没关系,我刚找到它。它就在我的眼皮底下。它定义为 --refs
'Miscellaneous Options'包括--refs
--refs
Limit history rewriting to the specified refs. Implies
--partial
.
In addition to the normal caveats of--partial
(mixing old and new history, no automatic remapping ofrefs/remotes/origin/*
torefs/heads/*
, etc.), this also may cause problems for pruning of degenerate empty merge commits when negative revisions are specified.
并且...它会移动标签,正如我在“--refs
作为示例。