Create a commit by a different author

Isabelle Viktoria Maciohsek · Git, Commit · Apr 13, 2021

Creates a new commit by the specified author.

  • Use git commit -m <message> to create a new commit with the specified <message>.
  • Use the --author option to change the <name> and <email> of the commit's author.
git commit -m <message> --author="<name> <email>"
# Make some changes to files
git add .
git commit -m "Fix the network bug" --author="Duck Quackers <>"
# Creates a commit by `Duck Quackers`

Recommended snippets