Articles → Git → Find The Difference Between 2 Branches In GIT
Find The Difference Between 2 Branches In GIT
Syntax
git diff <branch1> <branch2>
Example
- Commit "1.txt" (Master branch gets created).
- Create a new branch "MyBranch".
- Switch to "MyBranch".
- Commit "2.txt".
- Run "git diff" command.
Click to Enlarge