DEV Community

Igor Santos
Igor Santos

Posted on

4 1

How to set different defaults for author and committer at git

Me, looking for a way to set different author and committer on Google: nowhere to be found
Me, looking for a way to set different author and committer on Google: nowhere to be found. Sad Igor was sad.

I wanted to have a default Committer that’s different from my default Author, as I need to differentiate commits made from my local and testing environments.

This is not as straight-forward as setting name/email at git, as there are no separate configuration entries for author and committer. However, it’s still possible if you override some environment variables, as follows: 
Example (at your ~/.bashrc or ~/.bash_profile):

GIT_COMMITTER_NAME=”Deploy server”
GIT_COMMITTER_EMAIL=”deploy@server.dev”
Enter fullscreen mode Exit fullscreen mode

In case you’ve forgotten/don’t know, you can set default name/user for git commits by editing ~/.gitconfig or running commands like these:

$ git config — global user.name “Igor Santos”
$ git config — global user.email “igor.santos@example.com”
Enter fullscreen mode Exit fullscreen mode

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up