How to see code changes after git pull?

后端 未结 5 1260
孤城傲影
孤城傲影 2020-12-07 09:19

I would like to inspect any code changes after doing a git pull. Currently it\'s just showing me which files changes. How can I see what code changed?

5条回答
  •  时光说笑
    2020-12-07 09:48

    git log --name-status -2
    

    Will show you the names of the files that changed for the last two commits.

    git log -p -2
    

    Will show you the changes themselves.

    Before you pull,

    git fetch
    git log --name-status origin/master..
    

    Will show you what commits you are about to retrieve, along with the names of the files.

提交回复
热议问题