compare 2 states in the git branches code example Example: git compare two branches git diff branch1..branch2