首页 > 代码库 > Difference between git remote add and git clone
Difference between git remote add and git clone
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。