“Author” and “Committer” fields in git metadata…

Discovered a nice little git trick today.  I haven’t seen this documented, so I’m not sure if it’s a feature per se, but if you set your user.name via git config like so:

[user]
    name = accountname
    email = email@company.com

and then commit with the --author="Full Name" flag set to another name, this will set git’s commit metadata such that “Author:” is “Full Name” and “Committer:” is “accountname”.

Useful when you want to see the Author in your git logs and the Committer in tools like Hudson or Jenkins.

Tags: ,

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply