This command works to get the files and compile them:
git clone a-valid-git-url
for example:
git clone git://cfdem.git.sour
I just got this message and there is a very simple answer before trying the others. At the parent directory, type git init
git init
This will initialize the directory for git. Then git add and git commit should work.
git add
git commit