Search code examples
gitphpstorm

How to check all changes in project under git?


How can I check all changes in project under git I made since last pull ? git status shows only modified files, I want to see code too. I use PhpStorm 2020.3.1 in my work, but all git commands I do in the console.

I would prefer to check all changes in PhpStorm, is that is possible or some other tools.

Thanks!


Solution

  • Last pull moved your origin/master branch (let's talk about your master). To see commits since the last pull run

    git log origin/master..master
    

    To see code change since the last pull:

    git diff origin/master..master
    

    To split the changes per commit:

    git log -p origin/master..master
    

    (Option -p means "show patches in addition to commit info").

    To make the commands more universal:

    git log -p '@{u}..'
    git diff '@{u}'
    

    (${u} means "the upstream branch for the current branch"; i.e. for the current branch master upstream would be origin/master).