git-filter-repo 是一个Python脚本,可以通过pip进行安装。首先,确保你的系统上安装了Python和pip。你可以通过运行以下命令来检查pip是否已安装: bash pip --version 如果pip未安装,你可以通过Python的官方安装程序或包管理器来安装pip。安装pip后,使用以下命令安装 git-filter-repo: bash pip install git-filter-re...
Quickly rewrite git repository history (filter-branch replacement) - git-filter-repo/INSTALL.md at main · newren/git-filter-repo
1.安装git-filter-repo,brew install git-filter-repo。(https://github.com/newren/git-filter-repo) 2.将work仓库 A、C,切换到master分支。 3.在work A中执行 git filter-repo --path src/ --path pom.xml --path .gitignore(--path为要保留的目录,执行完成后会删除所有无关的文件及其git记录)。 4...
install 安装package manager,这里去alternativeto找即可 我的是mac系统,用Homebrew安装 ## install brew install git-filter-repo 过程可能会下载一些依赖包,如果失败,请尝试更换镜像源 brew edit <package name> 如果更换镜像源还是下载失败,尝试手动下载,然后 brew --cache 找到下载缓存未知,把手动下载的包copy到此处...
关于git-filter-repo的下载安装请前往推荐阅读2中的地址自行获取,这里就不啰嗦,下面我们直接开始。 1.打开 Git Bash 2.克隆要拆分的仓库 1 git clone https://xxx/trade 3.将当前工作目录更改为您克隆的仓库 1 cd trade 4.要从仓库中的其余文件过滤出该子文件夹,请运行 git filter-repo,提供以下信息: ...
git-filter-repo的命令选项 (flag) 主要用来操作目录树,根据操作的目录树自动判断需要修改的git提交历史信息。 比如我们需要保留webapp目录,删除server目录,那么仅需执行: git filter-repo --path'webapp/' 这样仓库中的目录结构就会变为: webapp/ app.tsx ...
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 ...
alternative filtering tool such as 'git filter-repo' (https://github.com/newren/git-filter-repo/) instead. See the filter-branch manual page for more details; to squelch this warning, set FILTER_BRANCH_SQUELCH_WARNING=1. Proceeding with filter-branch... ...
filter-repo requires: git >= 2.36.0 python3 >= 3.6 How do I install it? While the git-filter-repo repository has many files, the main logic is all contained in a single-file python script named git-filter-repo, which was done to make installation for basic use on many systems trivial...
首先使用这个命令安装 git-filter-repo 版本要求:python3 >= 3.5 | git >= 2.22.0 安装成功以后,找到一个带有git仓库的项目,可以...