我在读什么 git filter-repo
可以做,因为我想用它做一个小实验....我有这个 repo,我只想从中获取一个目录的历史记录,比如说.... master..... 但我不想对主人工作。我想创建一个新分支,比如 filter-repo-test
并让 git filter-repo
单独在这个分支上运行它的魔法。我正在阅读手册,但没有看到仅指定给定分支的选项。是否可以?
https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html
最佳答案
'Miscellaneous Options ' 包括 Limit history rewriting to the specified refs. Implies --refs
--refs
--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.
而且...它会移动标签,正如我在“Git Subdirectory Filter with tags ”中所记录的,它确实使用了 --refs
, 举个例子。
关于git filter-repo : can it be used on a specific branch?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59315574/