git commit –author doesn’t work when global not set

What if you set the git config info just for the current repository?

  git config user.email "[email protected]"
  git config user.name "Your Name"

EDIT
Based on OP comment a possible solution is:

GIT_AUTHOR_EMAIL="[email protected]" && GIT_AUTHOR_NAME="Your Name" && git commit

Leave a Comment