How to Show All Your Git Config Properties at Once |Video upload date:  · Duration: PT4M19S  · Language: EN

Quick guide to list every Git config property across local global and system scopes with commands examples and cleaning tips

Want to find that mysterious git setting that keeps turning your commits into chaos The command you need is small and merciless and it tells you exactly which file is lying to you

Run one command to map every config value and its file

Open a terminal in your repo and run the following This prints each config key with the file path that supplied the value so you can stop guessing and start deleting

git config --list --show-origin

The output shows lines that include the file path and the key equal value pair This is the single command that saves time and dignity when an option misbehaves

Which scope wins and why it matters

Git settings can come from multiple places Local repo config global user config and system config are the usual suspects Local settings in .git config override your global dotfiles so if your repo acts weird check the repo first

  • Local repo config located in .git config
  • Global user config usually in your home file like ~/.gitconfig
  • System config that applies to all users on the machine

Keep this precedence in mind when you find duplicate keys The show origin output gives the file path so you know which file to edit

Filter the output to avoid scrolling forever

Pipe the output to a search tool to narrow things down For Unix like systems use grep For Windows use findstr Examples below

git config --list --show-origin | grep user

git config --list --show-origin | findstr user

That finds user name and email settings without scrolling through unrelated decorations

Edit or remove the offending entries

Change or remove values using git config commands so you do not break your dotfiles by accident Use the edit command for sane edits or unset to remove a key

git config --global --edit

git config --local --edit

git config --global --unset user.name

git config --unset user.email

You can also open ~/.gitconfig in a text editor if you enjoy living dangerously Manual edits are fine but commit your dotfiles or stash them somewhere if you care about being able to undo

Quick troubleshooting checklist

  • Run git config --list --show-origin before blaming Git or your tool
  • Look at the file path in the output to know which config to edit
  • Use grep or findstr to filter results and save your scrolling thumb
  • Unset duplicates so local or global settings do not fight each other

There you go The next time Git does something weird run the show origin command first then fix the file that caused the trouble You will feel smarter and your CI will stop yelling at you

I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!

This is a dedicated watch page for a single video.