{"thread":{"id":"63590","subject":"\"git config get\" returns \"error: key does not contain a section: get\"","startedAt":"2025-06-05T16:16:37Z","lastAt":"2025-06-05T16:38:49Z","messageCount":3,"participants":["Scott Birl (Temple Univ)","Kristoffer Haugsbakk"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"519791","messageId":"MW3PR11MB47638E3211C195DC1C032DB9C36FA@MW3PR11MB4763.namprd11.prod.outlook.com","threadId":"63590","inReplyTo":null,"subject":"\"git config get\" returns \"error: key does not contain a section: get\"","fromName":"Scott Birl (Temple Univ)","fromEmail":"sbirl@temple.edu","sentAt":"2025-06-05T16:16:34Z","receivedAt":"2025-06-05T16:16:37Z","isPatch":false,"sender":{"key":"sbirl@temple.edu","avatar":null},"body":"Hello all:\n\nDebian 12/bookworm -- git is already the newest version (1:2.39.5-0+deb12u2).\nTrying out examples from https://git-scm.com/docs/git-config.html#EXAMPLES\n\n----\n$ which git\n\ngit is hashed (/usr/bin/git)\n\n-----\n$ git config get --type=color --default=\"reset\" \"\"\n\nusage: git config [<options>]\n\nConfig file location\n    --global              use global config file\n    --system              use system config file\n    --local               use repository config file\n    --worktree            use per-worktree config file\n    -f, --file <file>     use given config file\n    --blob <blob-id>      read config from given blob object\n\nAction...\n-----\n\n$ git config get --type=color --default=\"blue reverse\" color.diff.whitespace\n\nusage: git config [<options>]\n\nConfig file location\n    --global              use global config file\n    --system              use system config file\n    --local               use repository config file\n    --worktree            use per-worktree config file\n    -f, --file <file>     use given config file\n    --blob <blob-id>      read config from given blob object\n\nAction...\n----\n\n$ git config get core.filemode\n\nerror: key does not contain a section: get\n-----\n\n$ git config --global get core.filemode\n\nerror: key does not contain a section: get\n-----\n\n$ git config --local get core.filemode\n\nerror: key does not contain a section: get\n-----\n\npwd: $HOME\ncat -n ~/.gitconfig:\n\n     1  [core]\n     2          fileMode = true\n     3  ###\n-----\n\nCan someone explain what's going on?\n\nThanks.\n  \n  \n\n"},{"id":"519795","messageId":"d2829090-de29-466f-b17a-734c5e8bf59a@app.fastmail.com","threadId":"63590","inReplyTo":"MW3PR11MB47638E3211C195DC1C032DB9C36FA@MW3PR11MB4763.namprd11.prod.outlook.com","subject":"Re: \"git config get\" returns \"error: key does not contain a section: get\"","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-06-05T16:33:41Z","receivedAt":"2025-06-05T16:34:13Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Thu, Jun 5, 2025, at 18:16, Scott Birl (Temple Univ) wrote:\n> Hello all:\n>\n> Debian 12/bookworm -- git is already the newest version (1:2.39.5-0+deb12u2).\n> Trying out examples from https://git-scm.com/docs/git-config.html#EXAMPLES\n\nThat looks like Git 2.39.0.\n\n> [...]\n> $ git config get core.filemode\n>\n> error: key does not contain a section: get\n\n`git config get` is from Git 2.46.0.\n\nI get the same error on 2.40.0.\n\nYou need `git config --get`. That’s the old syntax.\n"},{"id":"519796","messageId":"MW3PR11MB47631ACCE4347984E192026BC36FA@MW3PR11MB4763.namprd11.prod.outlook.com","threadId":"63590","inReplyTo":"d2829090-de29-466f-b17a-734c5e8bf59a@app.fastmail.com","subject":"RE: [External] Re: \"git config get\" returns \"error: key does not contain a section: get\"","fromName":"Scott Birl (Temple Univ)","fromEmail":"sbirl@temple.edu","sentAt":"2025-06-05T16:38:47Z","receivedAt":"2025-06-05T16:38:49Z","isPatch":false,"sender":{"key":"sbirl@temple.edu","avatar":null},"body":"> `git config get` is from Git 2.46.0.\n> \n> I get the same error on 2.40.0.\n> \n> You need `git config --get`. That's the old syntax.\n\nUnderstood.  Thanks.\n\n"}]}