Here are some common Git configurations you might find useful:
-
User Information:
- Set your name:
git config --global user.name "Your Name" - Set your email:
git config --global user.email "your.email@example.com"
- Set your name:
-
Line Endings:
- For Windows users, to convert LF to CRLF on checkout:
git config --global core.autocrlf true
- For Windows users, to convert LF to CRLF on checkout:
-
Default Editor:
- Set the default text editor for commit messages:
git config --global core.editor "nano"
- Set the default text editor for commit messages:
-
Color Output:
- Enable colored output in the terminal:
git config --global color.ui auto
- Enable colored output in the terminal:
-
Merge Tool:
- Set a default merge tool:
git config --global merge.tool meld
- Set a default merge tool:
-
Push Behavior:
- Set the default behavior for
git push:git config --global push.default simple
- Set the default behavior for
-
Credential Helper:
- Cache credentials for a specified time:
git config --global credential.helper cache
- Cache credentials for a specified time:
These configurations help customize your Git experience and improve workflow efficiency. For more detailed exploration, check out relevant labs on LabEx!
