将git存储库复制到USB驱动器 [英] Copying a git repository to USB drive

查看:107
本文介绍了将git存储库复制到USB驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个开源项目,并在我的机器上安装了所有代码的git repo。回购是一个很大的,我想继续努力,而我没有访问我的电脑。



如果我将回购复制到我的USB驱动器它仍然会像我在我的机器上的原始回购(相同的配置等)?

如果复制不起作用,有没有办法实现这一点,而不必在USB驱动器上重新创建从头开始回购?

解决方案

它会工作,但某些配置变量赢得' Git拥有三个配置级别:全系统(PC上的所有用户),全局(用户特定)和特定于回购的环境。



特定于回购的配置将随您的回购移动;系统和全局配置不会。我会检查你的配置文件,如果有必要的话还可以抓取你的用户特定配置的副本。


I am working on an Open Source project and I have a git repo on my machine with all the code. The repo is kind of big, and I would like to keep working on it while I do not have access to my computer.

If I copy the repo into my USB drive will it still be behaving as if I was on the original repo in my machine (same configurations, etc.)?

If copying does not work, is there a way of achieving this without having to recreate the repo from scratch on the USB drive?

解决方案

It will work, but certain config variables won't travel with you.

Git has three levels of configuration: system-wide (all users on a PC), global (user-specific) and repo-specific.

The repo-specific configs will move around with your repo; the system and global configs won't. I would check your config files and if necessary also grab a copy of your user-specific configs.

这篇关于将git存储库复制到USB驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆