What is the difference between git clone and checkout?

后端 未结 5 688
醉话见心
醉话见心 2020-12-22 14:40

What is the difference between git clone and git checkout?

5条回答
  •  情歌与酒
    2020-12-22 15:19

    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.

提交回复
热议问题