Git diff

From NovaOrdis Knowledge Base
Jump to: navigation, search



Changes in the Working Directory that are Not Staged

git diff

Changes Staged for Next Commit

This shows the difference between the index and the last commit.

git diff --cached|--staged

Changes in Working Directory since Last Commit

git diff HEAD

Differences between Two Branches

git diff develop..task/my-branch path/to/folder

It seems the order in which the branches are specified does not matter.

For the entire repository:

git diff develop..task/my-branch .