GIT commit as different user without email / or only email

The minimal required author format, as hinted to in this SO answer, is

Name <email>

In your case, this means you want to write

git commit --author="Name <email>" -m "whatever"

Per Willem D’Haeseleer’s comment, if you don’t have an email address, you can use <>:

git commit --author="Name <>" -m "whatever"

As written on the git commit man page that you linked to, if you supply anything less than that, it’s used as a search token to search through previous commits, looking for other commits by that author.

Leave a Comment