Add reset-author and no-edit to author rewriting (#169)

This commit is contained in:
Clemens Lieb 2017-12-12 14:56:52 +01:00 committed by Richard Littauer
parent 418f0a0032
commit 8d74313257
1 changed files with 7 additions and 1 deletions

View File

@ -142,7 +142,13 @@ If you have already pushed the message, you can amend the commit and force push,
If it's a single commit, amend it
```sh
$ git commit --amend --author "New Authorname <authoremail@mydomain.com>"
$ git commit --amend --no-edit --author "New Authorname <authoremail@mydomain.com>"
```
An alternative is to correctly configure your author settings in `git config --global author.(name|email)` and then use
```sh
$ git commit --amend --reset-author --no-edit
```
If you need to change all of history, see the man page for `git filter-branch`.