Skip to content
  • Jonathan Nieder's avatar
    credential doc: make multiple-helper behavior more prominent · 515360f9
    Jonathan Nieder authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Git's configuration system works by reading multiple configuration
    files in order, from general to specific:
    
     - first, the system configuration /etc/gitconfig
     - then the user's configuration (~/.gitconfig or ~/.config/git/config)
     - then the repository configuration (.git/config)
    
    For single-valued configuration items, the latest value wins.  For
    multi-valued configuration items, values accumulate in that order.
    
    For example, this allows setting a credential helper globally in
    ~/.gitconfig that git will try to use in all repositories, regardless
    of whether they additionally provide another helper.  This is usually
    a nice thing --- e.g. I can install helpers to use my OS keychain and
    to cache credentials for a short period of time globally.
    
    Sometimes people want to be able to override an inherited setting.
    For the credential.helper setting, this is done by setting the
    configuration item to empty before giving it a new value.  This is
    already documented but the documentation is hard to find ---
    git-config(1) says to look at gitcredentials(7) and the config
    reference in gitcredentials(7) doesn't mention this issue.
    
    Move the documentation to the config reference to make it easier to
    find.
    
    Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    515360f9