Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.



Git Diff



The "git status" command will display any local commits that have not been pushed, however it will not display any remote commits that have not been pulled.

Here is an easy way of determining if all local commits are on the remote repository and all remote commits are on the local repository:

git diff BRANCH_NAME origin/BRANCH_NAME

If the output is blank, then both the local and remote repositories for the branch are identical. Otherwise, the difference between both branches will be displayed.

by Phil for Humanity
on 20121204

Related Articles
 » Git Changes
 » Git Aliases
 » Perforce P4Merge