change author of git commit
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
14
git.md
14
git.md
@@ -9,3 +9,17 @@ 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
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user