1.0 KiB
1.0 KiB
Configure Git User
This recipe configures the Git author identity used when creating commits.
Verify Current Configuration
git config --global --get user.name
git config --global --get user.email
Configure Global Identity
Replace the values below with your own information.
git config --global user.name "Jota Odiceu"
git config --global user.email "jotaodiceu@odinetwork.com.br"
Verify Configuration
git config --global --list | grep user
Expected output:
user.name=Jota Odiceu
user.email=jotaodiceu@odinetwork.com.br
Repository Specific Configuration
Override the global identity for a single repository.
git config user.name "Another Name"
git config user.email "another@email.com"
Troubleshooting
Git still uses another email
Check where the value comes from.
git config --show-origin --get user.email
If the repository has a local configuration, it overrides the global one.
Verify all configuration
git config --list --show-origin