首页 > 其他 > 详细

Difference between git remote add and git clone

时间:2017-03-21 12:25:38      阅读:336      评论:0      收藏:0      [点我收藏+]

http://stackoverflow.com/questions/4855561/difference-between-git-remote-add-and-git-clone

git remote add just creates an entry in your git config that specifies a name for a particular URL. You must have an existing git repo to use this.

git clone creates a new git repository by copying an existing one located at the URI you specify.

 

These are functionally similar (try it!):

 # git clone REMOTEURL foo
and:

 # mkdir foo
 # cd foo
 # git init
 # git remote add origin REMOTEURL
 # git pull origin master
Now there are minor differences, but fundamentally you probably won‘t notice them. As an exercise left to the reader, compare the .git/config‘s from each directory.

  

 

Difference between git remote add and git clone

原文:http://www.cnblogs.com/mysic/p/6593600.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!