git config

Updated: 14 May 2024

Username and email

git config --global user.name "John Doe"
git config --global user.email "who@ever.cloud"

Colours

git config --global color.status.updated magenta
git config --global color.status.untracked magenta
git config --global color.diff.old magenta

Set vim as default editor

git config --global core.editor "vim"

Temporarily switch to another ssh private key

git --config "core.sshCommand=ssh -i /home/mruser/.ssh/id_rsa" fetch

Leave a comment