diff --git a/recipes/git/01_configure-user.md b/recipes/git/01_configure-user.md new file mode 100644 index 0000000..b256155 --- /dev/null +++ b/recipes/git/01_configure-user.md @@ -0,0 +1,59 @@ +# Configure Git User + +This recipe configures the Git author identity used when creating commits. + +## Verify Current Configuration + +```bash +git config --global --get user.name +git config --global --get user.email +``` + +## Configure Global Identity + +Replace the values below with your own information. + +```bash +git config --global user.name "Jota Odiceu" +git config --global user.email "jotaodiceu@odinetwork.com.br" +``` + +## Verify Configuration + +```bash +git config --global --list | grep user +``` + +Expected output: + +```text +user.name=Jota Odiceu +user.email=jotaodiceu@odinetwork.com.br +``` + +## Repository Specific Configuration + +Override the global identity for a single repository. + +```bash +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. + +```bash +git config --show-origin --get user.email +``` + +If the repository has a local configuration, it overrides the global one. + +### Verify all configuration + +```bash +git config --list --show-origin +```