Show difference between two commits or branches
suggest changeTo view difference between two branches:
git diff <branch1>..<branch2>
To view difference between two commits:
git diff <commitId1>..<commitId2>
To compare the working tree with a branch or commit:
git diff <branch-or-commit>
To view summary of changes:
git diff --stat <branch/commitId>
To list paths that differ between the working tree and a commit:
git diff --name-only <commitId>
To list paths that differ between the working tree and a branch:
git diff --name-only <branchName>
To limit that comparison to one folder:
git diff --name-only <commitId> <folder_path>
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents