Skip to content

Commit 1e515c6

Browse files
authored
Cookbook: Add "Changing Last Commit Author"
1 parent 4716107 commit 1e515c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

git_cookbook.md

+5
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ Solution: This is called "squashing" in git parlance. There are a few ways to do
1919
Problem: I was playing around on the command line and messed up my local clone. I want to wipe the changes clean to match the remote
2020

2121
Solution: `git reset --hard origin/master` ([via SO](https://stackoverflow.com/questions/1628088/reset-local-repository-branch-to-be-just-like-remote-repository-head))
22+
23+
## Changing the Author of the Last Commit
24+
Problem: I merged an MCZ of which I was not the author, and would like to preserve proper authorship in git.
25+
26+
Solution: `git commit --amend --author="John Doe <[email protected]>"` ([via Tower](https://www.git-tower.com/learn/git/faq/change-author-name-email))

0 commit comments

Comments
 (0)