今年早些时候,当我在Windows上安装git-filter-repo时,以下步骤对我起了作用:
1.https://docs.github.com/cn/get-started/using-git/splitting-a-subfolder-out-into-a-new-repository 2.https://github.com/newren/git-filter-repo 3.https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html#EXAMPLES 文中只是提及了git-filt...
网上能搜到的资料大部分都是 git filter-branch,不仅速度慢,还容易出问题,而且官方都在使用git filter-branch时推荐git filter-repo,因此尝试一下官方推荐的方法 1. 安装git-filter-repo 官方Git库有很详细的说明 这里选择通过pip安装,windows需要手动安装python或者conda pip install git-filter-repo 2. 找出要删除...
在github首页上,关于git-filter-repo有这样的描述 git-filter-repo可以胜任很多需要修改提交历史的场景,虽然它与git-filter-branch命令功能有些许重合,但摒弃了git-filter-branch那令人抓狂的执行效率。 在功能方面,git-filter-repo的人机交互设计让其面对简单的修改更加游刃有余,同时仍然可以像复杂的git-filter-branch命...
git-filter-repo是官方推荐用于修改commit历史的小工具,详情参见:https://github.com/newren/git-filter-repo/tree/main/contrib/filter-repo-demos。 依赖条件 要使用 git-filter-repo工具,需要做如下准备: git >= 2.22.0 at a minimum some featuresrequire git >= 2.24.0 ...
一个例子:git filter-repo --path --invert-paths xxx.jpa 我主要强调一点,filter-repo使用完之后,当前执行的本地库不在与远程库有关系,并且无法再进行关联提交。但是它保留了历史的所有分支信息,我还没有全面研究过filter-repo是否有不强制取消关联关系的选项,但是显然这样操作之后,是让你提交到一个新的repo但是...
Quickly rewrite git repository history (filter-branch replacement) - git-filter-repo/INSTALL.md at main · newren/git-filter-repo
git filter-repo is a versatile tool for rewriting history, which includes capabilities I have not found anywhere else. It roughly falls into the same space of tool as git filter-branch but without the capitulation-inducing poor performance, with far more capabilities, and with a design that sca...
不建议使用该选项,因为它会导致难以在现有文档、错误报告和归档中查找到 SVN 修订版本号的旧引用。 如果你计划最终从 SVN 迁移到 Git,并确定要放弃 SVN 历史,请考虑git-filter-repo。filter-repo 还允许重新格式化元数据,以方便阅读,并为非 "svn.authorsFile" 用户重写作者信息。
# if you run 'git_commit_non_empty_tree "$@"' in a commit filter, # it will skip commits that leave the tree untouched, commit the other.git_commit_non_empty_tree() { if test $# = 3 && test "$1" = $(git rev-parse "$3^{tree}"); then map "$3" ...