Git

Git知识-diff

diff比较提交异同

Posted by MetaNetworks on January 8, 2019
本页面总访问量
  • 两次提交

    1
    2
    
    git diff [] []
    # [] can be branch,label,HEAD
    
  • 与上一次提交进行比较

    1
    2
    
    git diff []^!
    #use ^! to compare between the last commit and the commit now
    
  • 限制显示文件范围

    1
    
    git diff [] [] - $DIR
    
  • 统计修改情况

    • 用 —stat选项来显示每个文件中的修改数量
    1
    
    git diff --stat [] []