Reputation: 81
I have a remote repo called FOO which has the two following revisions :
commit1 commit2
I have a directory 'bar' which contains all the files for commit2 but I am missing the .git directory and all metadata.
Is there a way for me to 'git clone' only the '.git' metadata from the remote into my current directory without the files?
The main goal is to avoid wasting time checking out files since I already have them.
Any suggestions ? Thanks in advance.
Upvotes: 8
Views: 6023
Reputation: 942
git clone -n
-n will tell git not to checkout the head after performing the clone.
Upvotes: 25