0

Does a git command exist to identify whether two branches currently have the exact same code?

I've tried:

git diff master develop

This command doesn't fail but it doesn't actually do anything either (i.e. it returns nothing)

CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106

1 Answers1

5

Returning nothing means they are identical. Just so that you can see for yourself if that's indeed the case, take a look at the tree object ID of the two revisions:

git cat-file -p master
git cat-file -p develop

They should have the same ID and that means the "tree" (files, directories and content) is the same.

eftshift0
  • 26,375
  • 3
  • 36
  • 60