gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 14:38:33 34 4
gpt4 key购买 nike

我在读什么 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/

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