Last Updated: February 01, 2022
·
99.66K
· italolelis

git: Show difference between local and remote branches

Sometimes we need to know which files will be pulled to our working tree from the remote repository. To do that just run:

git fetch origin ; git diff --name-only master origin/master 

The git fetch command will fetch all changes that happened in the origin. And the git diff will show us the differents files between our working tree and the remote.

Related protips:

Remove all your local git branches but keep master

1 Response
Add your response

Really? so easy! It's good that I saw it because I still didn't know ...

over 1 year ago ·