Git clone How to Make a Copy of a Repository

October 14th, 2011 by Regaz

This short Tutorial is based on my actual Experience of Git and SSH at Hostgator.
There are Essentially two Form of Cloning:

Make a Whole Clone
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.

(Visited 1 times, 1 visits today)

Tags: , ,