Skip to content

Commit 3bb72d6

Browse files
committed
[FEATURE] Add how-to to change commit author
1 parent c171881 commit 3bb72d6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

git_cheat_sheet.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,16 @@
123123
git commit
124124
git commit -m "<message>"
125125

126-
* Change the last commit
126+
* Change the last commit
127127

128128
git commit --amend -a
129129

130+
_This will replace the last commit (new ID), so it should only be used if the modified branch was not pushed yet_
131+
132+
* Special: Change author of the last commit
133+
134+
git commit --amend --author "John Doe <[email protected]>"
135+
130136
## Branches
131137

132138
* List local branches

0 commit comments

Comments
 (0)