Where is my git alias stored?

前端 未结 2 403
一个人的身影
一个人的身影 2021-01-03 21:48

I have an alias that I cannot find. Typing git help subaddvim gives me:

`git subaddvim\' is aliased to `log HEAD\'

I think I d

2条回答
  •  死守一世寂寞
    2021-01-03 22:26

    There is no difference between using the undocumented (or is it obsolete) --local flag and no flag. Git never looks for a gitconfig in your repository root ($repo_path/.gitconfig). Repo-local config changes are in .git/config.

    git help config explains the valid options:

    --global For writing options: write to global ~/.gitconfig file rather than the repository .git/config.

       For reading options: read only from global ~/.gitconfig rather than from
       all available files.
    

    --system For writing options: write to system-wide $(prefix)/etc/gitconfig rather than the repository .git/config.

       For reading options: read only from system-wide $(prefix)/etc/gitconfig
       rather than from all available files.
    

    (Using git version 1.7.9)

    You could try searching with this (from your repo root and assuming git is installed in /bin):

    grep subaddvim .git/config ~/.gitconfig /etc/gitconfig
    

提交回复
热议问题