Skip to content

Instantly share code, notes, and snippets.

@srathi-monarch
Created May 21, 2024 09:22
Show Gist options
  • Save srathi-monarch/5c5caf39f7f27e321ad08bdd0c30e041 to your computer and use it in GitHub Desktop.
Save srathi-monarch/5c5caf39f7f27e321ad08bdd0c30e041 to your computer and use it in GitHub Desktop.
Clean .gitconfig (removes comments),
IFS=$'\n'; for key in $(git config --global -l); do bash -c "git config --file=.gitconfig_new $(echo $key | tr '=' ' ')"; done
# Chekc both files and replace .gitconfig if it looks good!.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment