Thursday 25 June 2015

A quick guide to git clone

I have source code for my project which I want to share with team.

How to create a repository?

In the server,
git init <src directory>


I have created a repository in a folder. If I move source code to another folder will it create any problem?  No



How do I checkout the source code?

Using clone. Every version of every file for the history of the project is pulled down by default when you run git clone.

For example copy the url of linux kernel code,

Check out using:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
 
 
 
 
 This downloads to the folder linux-stable. Optionally you can specify the folder in which you want the code to be downloaded.

git clone http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/  <dir_name>

 

No comments:

Post a Comment