Files
30-seconds-of-code/snippets/commit-set-author.md
2022-05-04 19:36:40 +03:00

672 B

title, tags, expertise, author, cover, firstSeen, lastUpdated
title tags expertise author cover firstSeen lastUpdated
Create a commit by a different author commit intermediate maciv blog_images/new-plant.jpg 2021-04-13T20:07:27+03:00 2021-04-13T21:10:59+03:00

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 <cool.duck@qua.ck>"
# Creates a commit by `Duck Quackers`