change author of git commit
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2026-04-22 18:28:29 +05:30
parent 5b006b2cea
commit 25b1dfd497

16
git.md
View File

@@ -8,4 +8,18 @@ git push --set-upstream <remote-path> <new-branch-name>
```bash
git restore .
```
```
3. Rename author
```bash
git filter-branch -f --env-filter '
NEW_NAME="<new-name>"
NEW_EMAIL="<new-email>"
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
' --tag-name-filter cat -- --all
```