git filter-branch で残すファイルを列挙する2018年06月12日 18時41分03秒

git filter-branch で特定のファイルだけを残すではファイル名を正規表現を用いて、特定のファイルを残した。

今回は、三十近いファイルを残す必要が出来て、正規表現では記述できないので、前回のものを若干応用。git レポジトリの外にファイルを置く。

% git filter-branch --tree-filter ' find * -type f  | fgrep -v -f /tmp/FILELIST | xargs rm' --prune-empty

前回