TIL Set git username and email for a single pull request
Sometimes you need to use a different username and email for a single pull request to impersonate a different user.
For that case, git provides the -c
flag, which allows you to pass configuration parameters to the command you are about to execute.
The following command will create a commit with username silencer-bot
and an empty email address.
git -c user.name=silencer-bot -c user.email= commit
Note that -c
flags needs to be set right after the git
command but before the subcommand (in this case, commit
).