Check The Difference Between Two Files Git. Diff between current branch and master. Here HEADrepresents the tip of current branch and HEADrepresents the version before the last commit.
Git diff 27fa75e ada9b57 myfiletxt. Nov 30 2020 By executing the git diff command we can see the differences between these two files. Here HEADrepresents the tip of current branch and HEADrepresents the version before the last commit.
Git diff --cached filename You can also compare files between two different commits.
By default git diff will execute the comparison against HEAD. Git diff --name-status masterstaging. Or if you want to see the version between two separate commits. Omitting HEAD in the example above git diff pathtofile has the same effect.
