Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between git clone and checkout?

Tags:

git

command

What is the difference between git clone and git checkout?

like image 750
Praveen Sripati Avatar asked Sep 04 '11 10:09

Praveen Sripati


1 Answers

The man page for checkout: http://git-scm.com/docs/git-checkout

The man page for clone: http://git-scm.com/docs/git-clone

To sum it up, clone is for fetching repositories you don't have, checkout is for switching between branches in a repository you already have.

Note: for those who have a SVN/CVS background and new to Git, the equivalent of git clone in SVN/CVS is checkout. The same wording of different terms is often confusing.

like image 160
August Lilleaas Avatar answered Sep 24 '22 18:09

August Lilleaas