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

git config --unset does not remove section

From
ABAngelo Borsotti <angelo.borsotti@gmail.com>
Date
Oct 21, 2012, 06:46 UTC
Message-ID
<CAB9Jk9C_b_PScm3vEdvxsjqNHpTbz7OTTdFeFey7Sdb+M5gYFw@mail.gmail.com>
Hello,

git config --unset does not remove the section in the configuration file when the removed key is the last one, leaving then an empty section that is lo longer used. E.g.:

    git config foo.bar true
creates:
    [foo]
	bar = true
then:
    git config --unset foo.bar
changes the section into:
    [foo]
Another git config foo.bar true changes the config file into:
    [foo]
    [foo]
	bar = true
Having two sections with the same name clutters the config file.
-Angelo Borsotti
Next: Junio C Hamano
Message 1 of 2 in “git config --unset does not remove section”
  1. Angelo BorsottiOct 21, 2012
  2. Junio C HamanoOct 21, 2012

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.