What is the difference between pull and clone in git?

后端 未结 11 1614
太阳男子
太阳男子 2020-12-04 04:29

What is the difference between doing (after mkdir repo and cd repo):

git init
git remote add origin git://github.com/cmcculloh/repo         


        
11条回答
  •  忘掉有多难
    2020-12-04 05:16

    clone: copying the remote server repository to your local machine.

    pull: get new changes other have added to your local machine.

    This is the difference.

    Clone is generally used to get remote repo copy.

    Pull is used to view other team mates added code, if you are working in teams.

提交回复
热议问题