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
If you want the Entire Repository Content less the Accessory you make:
git clone pathOrURL/To/yourProject path/To/yourProject
git clone ssh://email@example.com:2222/home/user/www/yourRepo ./yourRepo
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.