git/list[1] front-page[2] threads[3] people[4] search[5] about
 

"git config get" returns "error: key does not contain a section: get"

From
SUScott Birl (Temple Univ) <sbirl@temple.edu>
Date
Jun 5, 2025, 16:16 UTC
Message-ID
<MW3PR11MB47638E3211C195DC1C032DB9C36FA@MW3PR11MB4763.namprd11.prod.outlook.com>
Hello all:

Debian 12/bookworm -- git is already the newest version (1:2.39.5-0+deb12u2). Trying out examples from https://git-scm.com/docs/git-config.html#EXAMPLES

---- $ which git

git is hashed (/usr/bin/git)

----- $ git config get --type=color --default="reset" ""

usage: git config [<options>]
Config file location
    --global              use global config file
    --system              use system config file
    --local               use repository config file
    --worktree            use per-worktree config file
    -f, --file <file>     use given config file
    --blob <blob-id>      read config from given blob object

Action... -----

$ git config get --type=color --default="blue reverse" color.diff.whitespace
usage: git config [<options>]
Config file location
    --global              use global config file
    --system              use system config file
    --local               use repository config file
    --worktree            use per-worktree config file
    -f, --file <file>     use given config file
    --blob <blob-id>      read config from given blob object

Action... ----

$ git config get core.filemode

error: key does not contain a section: get -----

$ git config --global get core.filemode

error: key does not contain a section: get -----

$ git config --local get core.filemode

error: key does not contain a section: get -----

pwd: $HOME cat -n ~/.gitconfig:

     1  [core]
     2          fileMode = true
     3  ###
-----
Can someone explain what's going on?
Thanks.
  
  
Next: Kristoffer Haugsbakk
Message 1 of 3 in “"git config get" returns "error: key does not contain a section: get"”
  1. Scott Birl (Temple Univ)Jun 5, 2025
  2. Kristoffer HaugsbakkJun 5, 2025
  3. Scott Birl (Temple Univ)Jun 5, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.