This short Tutorial is based on my actual Experience of Git and SSH at Hostgator.
There are Essentially two Form of Cloning:
-
Cloning All in the Repository Including also the Working Directories
- Cloning Only the Git Repository Hashed
Make a Whole Clone
If you want the Entire Repository Content less the Accessory you make:
If you want the Entire Repository Content less the Accessory you make:
git clone pathOrURL/To/yourProject path/To/yourProject
Example:
git clone ssh://user@server.hostgator.com:2222/home/user/www/yourRepo ./yourRepo
Make a Pure Git Bare Clone
git clone --bare pathOrURL/To/yourProject path/To/yourProject.git
This is Roughly Equivalent to Duplicating the .git Directory Content:
cp -Rf pathOrURL/To/yourProject/.git path/To/yourProject.git
How you can see it Pull out from a Working Project the Git Component than hold in only the Git Condensed Hash Form of the Original Project. So there is an equivalence in meaning for the –bare option in init and clone commands.