美文网首页
Tips of Git

Tips of Git

作者: forks1990 | 来源:发表于2019-06-13 20:33 被阅读0次

    Disable git branch filter by less

    git config --global pager.branch false
    

    Search File Contains Both Pattern in Current Work Directory

    git grep --all-match -l --no-index -e 'pattern1' -e 'pattern2'
    

    --all-match means that a file must contains pattern1 and pattern2.
    -l means list matched files instead of lines
    --no-index only searches current working-set, history not searched.

    The confusing part is --or, --and work for single line, not the whole file,
    --all-match works on whole file.

    相关文章

      网友评论

          本文标题:Tips of Git

          本文链接:https://www.haomeiwen.com/subject/zhpefctx.html