mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-06-16 04:44:07 -03:00
Compare commits
3 Commits
b752196266
...
f4dabebc83
Author | SHA1 | Date | |
---|---|---|---|
f4dabebc83 | |||
449e36d21b | |||
819b14a73f |
10
README.md
10
README.md
@ -329,8 +329,18 @@ An alternative is to correctly configure your author settings in `git config --g
|
||||
$ git commit --amend --reset-author --no-edit
|
||||
```
|
||||
|
||||
If you need to change for multiple commits, you can use
|
||||
|
||||
```sh
|
||||
$ git -c rebase.instructionFormat='%s%nexec GIT_COMMITTER_DATE="%cD" GIT_AUTHOR_DATE="%aD" git commit --amend --no-edit --reset-author' rebase -r <commit>
|
||||
```
|
||||
|
||||
`<commit>` is a commit before all your bad commits. If you need to change all of history in the current branch including the root of the branch, put `--root` there instead.
|
||||
|
||||
If you need to change all of history, see the man page for `git filter-branch`.
|
||||
|
||||
Note this will change the history and a force push is required.
|
||||
|
||||
### I want to remove a file from the previous commit
|
||||
|
||||
In order to remove changes for a file from the previous commit, do the following:
|
||||
|
Reference in New Issue
Block a user