git filter-branch
[Josh History Filtering](https://texonom.com/josh-history-filtering-7ff53c499bdc4d5ba2b001b720aa3184) 


### Remove File
```typegit filter-branch -f --index-filter 'git rm --cached --ignore-unmatch "(.yarn*|.pnp*|yarn.lock|package-lock.json)"' --prune-empty -- --allgit push origin --force --all```
safer `--force-with-lease`

[git filter-repo](https://texonom.com/git-filter-repo-8548618e7c614e0f83202364fd8ba607)


### Change Commit user
```typegit filter-branch -f --env-filter \"GIT_AUTHOR_NAME='Newname'; GIT_AUTHOR_EMAIL='newemail'; \GIT_COMMITTER_NAME='committed-name'; GIT_COMMITTER_EMAIL='committed-email';" HEAD```

### delete commit by date
```typegit filter-branch -f --commit-filter '	if [ "$GIT_AUTHOR_NAME" = "seongland" ];	then		skip_commit "$@";	else		git commit-tree "$@";	fi' HEAD```
```typegit filter-branch -f --commit-filter 'STDIN=$(< /dev/stdin)if [ "$STDIN" = "meta: add \`.github\` folder" ]thenskip_commit "$@";elsegit commit-tree "$@";fi' HEADgit push origin --force --all```
```typegit filter-branch -f --commit-filter 'STDIN=$(< /dev/stdin)if [ "$STDIN" = "chore: add .github folder basic" ]thenskip_commit "$@";elsegit commit-tree "$@";fi' HEADgit push origin --force --all```
do not use cat - (commit message removed)





### file history remove
> [Untitled](https://www.kwanhee.me/view/?id=72)

> [How to Combine Multiple Git Commits into One](https://www.w3docs.com/snippets/git/how-to-combine-multiple-commits-into-one-with-3-steps.html)

> [Git: Bulk change of commit dates](https://stackoverflow.com/questions/60863773/git-bulk-change-of-commit-dates)





