git filter-repo : can it be used on a specific branch?

标签 git git-filter-repo

我在读什么 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 ' 包括 --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.


而且...它会移动标签,正如我在“Git Subdirectory Filter with tags ”中所记录的,它确实使用了 --refs , 举个例子。

关于git filter-repo : can it be used on a specific branch?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59315574/

相关文章:

git - Git Clone 的 Ansible 和 Git 权限被拒绝(公钥)

Git:列出所有远程分支上的所有提交?

Git 交互式 rebase 没有删除我的其他提交

Git 子树导出和重新导入问题

git - 使 git `replace` 提交永久(或类似)

git - 如何将我的 git 项目移动到除一个文件之外的所有提交的子目录?

bash - git filter repo 可以根据日期从许多 repos 交织提交中创建一个 monorepo 吗?

git - Zend Framework 1.x git 存储库