git clone 与复制粘贴,有什么区别?
如主题
注释中所述:我的意思是 git 克隆 是没有任何选项的 git 克隆,通过执行“git clone /C:/my_origin_folder”来执行
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"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我关于备份的这个答案应该给你一些关于克隆与复制的答案:将 git 存储库移至第二台计算机?
主要区别:
origin
设置,以便您可以推动它。注意,当您使用文件夹路径进行克隆时,差异会发生微妙的变化,因为对象和引用通常只是被复制/ 硬链接(相当于
--local
这是本地文件夹路径的默认值)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:
origin
setup pointing to original repo, so that you can push to it.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 而不是复制粘贴时,原始存储库将成为源。
此外,当在同一台机器上克隆时,您可以使用 --local 来加快速度。从手册页:
When you use git clone instead of copy paste, the original repository will be the origin.
Besides, when cloning on the same machine you can use --local to make it faster. From the manual page: