git clone vs复制粘贴,有什么区别? [英] git clone vs copy paste, what's the difference?
本文介绍了git clone vs复制粘贴,有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
我的这个关于备份的答案应该会给你一些克隆与复制的答案:将git repo移动到第二台计算机?
主要差异:
- 当您克隆时,您会获得远程
来源
- 你克隆,但是当你复制的时候你会这样做
请注意,当你使用文件夹路径克隆时,差异会微妙地变化, refs通常只是复制/硬连接(相当于 - local
,这是默认的w ith本地文件夹路径)
as stated in the subject
note: the git clone i mean is the git clone without any option, the one which is performed by doing "git clone /C:/my_origin_folder"
解决方案
This answer of mine regarding backup should give you some answer on clone vs copy: Moving a git repo to a second computer?
Main differences:
- When you clone, you get remote
origin
setup pointing to original repo, so that you can push to it. - You don't get hooks and reflog ( and also old objects) and other remotes when you clone but you do when you copy
Note that when you clone with a folder path, the differences change subtly, as the objects and refs are usually just copied / hardlinked ( equivalent of --local
which is the default with local folder paths)
这篇关于git clone vs复制粘贴,有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文