Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git retrieve config settings using a wildcard

Tags:

git

I'm learning git and I'm trying to figure out whether it's possible to get all config settings of a certain type using just git.

For example:

git config --get core.symlinks

This looks through all config settings and returns the values for each setting found. Filtering for specific configs like --global is pretty straightforward too. Now I'm wondering whether it's possible to get all settings of a certain category of settings, like getting all settings prefixed with core.:

git config --get core'.*' //doesn't work, the documentation does suggest a [value_regex]

Is something like this at all possible or should I just get used to pipelines and grep?

$ git config --list | grep core
like image 478
G_V Avatar asked Jun 25 '26 04:06

G_V


1 Answers

git config --get-regexp core'\.'
like image 157
phd Avatar answered Jul 01 '26 00:07

phd