filter-branch
모든 Commit에서 특정 파일 삭제나 이메일 정보를 변경 시 유용
git filter-branch --tree-filter 'rm -f passwords.txt' HEAD
passwords.txt 파일이 있으면 삭제
--tree-filter
프로젝트를 Checkout한 후에 각 Commit에 명시한 명령어를 실행하고 다시 Commit 함
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = byounghong@localhost ];
then
GIT_AUTHOR_NAME="hong";
GIT_AUTHOR_EMAIL=hong@example.com;
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
이메일 정보 수정
댓글