no13bus
V2EX  ›  问与答

git pull 之后 有文件改变了 如何查看文件的具体改变情况?

  •  
  •   no13bus · Oct 22, 2014 · 12401 views
    This topic created in 4428 days ago, the information mentioned may be changed or developed.
    6 replies  •  2014-10-23 22:39:55 +08:00
    chemzqm
    chemzqm
    Oct 22, 2014❤️1
    1
    git diff [options] <commit> <commit> [--] [<path>...]
    no13bus
    no13bus
    OP
    Oct 22, 2014
    2
    git diff HEAD^ HEAD
    zsh: no matches found: HEAD^

    $ git diff HEAD\^ HEAD
    成功.
    用的zsh 发现head后面的^需要转意
    yangg
    yangg
    Oct 22, 2014
    3
    git show # view the diff of last commit
    git whatchanged
    git log --stat --date=relative
    spritevan
    spritevan
    Oct 22, 2014
    4
    git log -p path_to_file
    vibbow
    vibbow
    Oct 23, 2014
    5
    sourcetree
    julyclyde
    julyclyde
    Oct 23, 2014
    6
    如果pull的时候merge进来很多commit
    就不能用HEAD和HEAD~1比较了吧?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   977 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 18:24 · PVG 02:24 · LAX 10:24 · JFK 13:24
    ♥ Do have faith in what you're doing.