如何更改Git存储库的位置 [英] how do I change the location of a Git repository

查看:62
本文介绍了如何更改Git存储库的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对使用Git完全陌生(发现它已经比SVN难使用得多),并且我注意到我导入的项目已直接转储到C:/Users//目录中.我更喜欢将其移动到其他地方,那么我该怎么做呢?

I'm completely new to using Git (and find it a lot harder to use than SVN already), and I noticed that the project I pulled in was dumped right in my C:/Users// directory. I prefer moving it somewhere else so how do I go about doing this?

推荐答案

只需将包含所有源代码和.git目录的文件夹移动到所需位置.

Just move the folder that contains all the source and the .git directory wherever you want.

Git不会将克隆的位置绑定到任何东西,它只会绑定到上游存储库的位置(如果您的存储库是克隆的话,则是您从中克隆的存储库的位置).

Git doesn't tie the location of your clone to anything, it is only tied to the location of the upstream repository (the one that you cloned from, if your repository is a clone, that is).

这篇关于如何更改Git存储库的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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