Git: can I suppress listing of 'modified content'/dirty submodule entries in status, diff, etc?

后端 未结 9 1644
谎友^
谎友^ 2020-11-28 02:32

Somewhen (around the 1.6.x releases, I think) git became aware of changes inside submodules. That only serves to annoy me:

$ git status vendor | grep modified:
#          


        
9条回答
  •  抹茶落季
    2020-11-28 02:50

    So git v1.7.2-rc2 has what I want:

    $ git diff --ignore-submodules=dirty vendor
    # no output
    
    $ git status --ignore-submodules=dirty vendor
    # On branch …
    nothing to commit (working directory clean)
    

    Building your own git howto:

    # get git
    git clone git://git.kernel.org/pub/scm/git/git.git git
    cd git
    git checkout v1.7.2-rc2
    
    # make git. beware of setting prefix
    make configure
    ./configure --prefix=/usr/local
    make
    sudo make install
    
    # you REALLY don't want to `make doc`, use this instead
    sudo make quick-install-man
    sudo make quick-install-html
    

提交回复
热议问题