git compare 2 commits on same branch code example Example: how to compare two commits in git $ git diff 012345..abcdef