Skip to content

--show-origin is not a flag for git config #1100

Closed

Description

@jaylogan

At the bottom of https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup it says you can use a --show-origin flag to determine where a config value was coming from, such as:

git config **--show-origin** rerere.autoUpdate

But when I try this on git version 2.7.4, it says that show-origin is an unknown option. Is there an alternative?

Activity

  1. ben commented on Aug 8, 2018

    @ben
    Member

    Looking through the history of the git-config manpage, it looks like --show-origin showed up between 2.6.0 and 2.8.0. It's possible you're running the last known version to not include that flag. 😄

    I'd advise you to upgrade. 2.7.4 was released over two years ago, and the current version is 2.18.0.

  2. assembleer commented on Apr 27, 2019

    @assembleer

    Run against the same problem (I guess) that --show-origin is giving unknown option.
    Found the following to work though:
    git config --list --show-origin (for the total config location of origin)
    git config --show-origin user.name (with a specific attribute)

    The Dutch epub (others were not checked) version does not contain the same text as the html version there and following the book text literally gives still the unknown option as reply.

  3. aollier commented on Apr 28, 2019

    @aollier
    Contributor

    Which version of git are you using?

  4. assembleer commented on Apr 28, 2019

    @assembleer

    Which version of git are you using?

    Version 2.11.0 (installed yesterday)
    OS: Debian Stretch (Linux ltpk-lt02 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux)
    I'm following the instructions in the Dutch version of the Pro Git book (epub version).

  5. aollier commented on Apr 28, 2019

    @aollier
    Contributor

    Can you write the output of the command please?

  6. assembleer commented on Apr 28, 2019

    @assembleer

    Can you write the output of the command please?

    I have to apologize, as I think I've been misled by my own ignorance. I'm learning Git from the book Pro Git and I was mixing up the help function from the screen with what was written in the book. On the screen when typing git config a usage text appears, that I mistakenly interpreted as that the options after the command could be limited to only being followed by --show-origin. So I typed git config --show-origin
    The book does not give this command as an example.
    The command and output that confused me on the screen were:

    $ git config --show-origin
    usage: git config [<options>]
    
    Config file location
        --global              use global config file
        --system              use system config file
        --local               use repository config file
    **[some output lines are removed from this part]**
        --bool-or-int         value is --bool or --int
        --path                value is a path (file or directory name)
    
    Other
        -z, --null            terminate values with NUL byte
        --name-only           show variable names only
        --includes            respect include directives on lookup
        --show-origin         show origin of config (file, standard input, blob, command line)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions