Skip to content

Attributing a git commit to a different author

Today, I was working on adding some standard formatting and linting to a repo. I didn't want the git history to look like I touched these files, so I chose to associate the changes with a bot account to make things cleaner.

I did this by updating my git name and email address prior to committing the changes.

git config user.name "Botty McBotFace"
git config user.email "BottyMcBotFace@gmail.com"

If you do this, don't forget to set these back to your name and email address once you finish!