Show diff between commits

前端 未结 11 2018
闹比i
闹比i 2020-12-02 04:00

I am using Git on Ubuntu 10.04 (Lucid Lynx).

I have made some commits to my master.

However, I want to get the difference between these commits. All of

11条回答
  •  遥遥无期
    2020-12-02 04:37

    To see the difference between:

    Your working copy and staging area:

    % git diff
    

    Staging area and the latest commit:

    % git diff --staged
    

    Your working copy and commit 4ac0a6733:

    % git diff 4ac0a6733
    

    Commit 4ac0a6733 and the latest commit:

    % git diff 4ac0a6733 HEAD
    

    Commit 4ac0a6733 and commit 826793951

    % git diff 4ac0a6733 826793951
    

    For more explanation see the official documentation.

提交回复
热议问题