--system
): Applies settings globally for all users on the computer.
--global
): Applies settings for a specific user account.
--local
): Applies settings only to a specific project/repository.
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
git config --global --list
user.name=Your Name
user.email=your-email@example.com
core.editor=whatever code editor you have selected
user.name
and user.email
settings :-
git config --global --unset user.name
git config --global --unset user.email
rm ~/.gitconfig
.gitconfig
file from C:\Users\PcName
location
git config --global core.editor "vim"
- For Vim
git config --global core.editor "code --wait"
- For VS Code
git config --global core.editor "notepad"
- For windows notepad
git config --global --edit
.gitconfig
) in the editor.
git config --global init.defaultBranch main
git config --global credential.helper cache
Your feedback helps us grow! If there's anything we can fix or improve, please let us know.
Weโre here to make our tutorials better based on your thoughts and suggestions.