Possible Duplicate:
How can I check whether a git repository has any commits in it?
Which is the best way to determine if repository is empty, like after it is just created?
Possible Duplicate:
How can I check whether a git repository has any commits in it?
Which is the best way to determine if repository is empty, like after it is just created?
One quick way would be to look for files in the .git/objects
directory. If there are none present then you know it must be brand new.
$> find .git/objects -type f | wc -l # if this prints 0, then it's brand spankin' new.