I want to remove a filter that added to Git. The command git config --list shows the filter I added
filter.spabs.clean=expand --initial -t 4
filter.spabs.smudge=expand --initial -t 4
filter.spabs.required
How can I remove it? Where does Git store the filters? I have verified .gitconfig and I don't have a .git/info/attributes file.
For removing in all config files (without having to look for the key):
git config --unset-all filter.spabs.clean
git config --unset-all filter.spabs.smudge
git config --unset-all filter.spabs.required
As illustrated in "git credential.helper=cache never forgets the password?", you can do a:
sudo git config --system --unset-all filter.spabs.clean
sudo git config --system --unset-all filter.spabs.smudge
sudo git config --system --unset-all filter.spabs.required
That would remove those keys from /etc/gitconfig.
so you need to know where they are defined, rather than git config --list you can run the 2 commands
git config --local --list
git config --global --list
For local filters, you need to look under .git/config file
For global filters, you need to look under ~/.gitconfig file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With