高度な Git
Amanda Crawford-Adamo
Software and Data Engineer
git filter-repo コマンド
git filter-repo
Git の履歴を高速かつ安全に書き換えるツール。
用途
pip で git filter-repo をインストール
pip install git-filter-repo
全コミットから secrets.txt を削除
git filter-repo --path secrets.txt --invert-paths
Filter-Repo 関連オプション
--path: 対象とするパスを指定
--invert-paths: --path で指定した以外のすべてを対象
出力
Parsed 150 commits
New history written in 0.10 seconds; now repacking/cleaning...
Repacking your repo and cleaning out old unneeded objects
重要な影響
ユースケース
ヒント
高度な Git