开发者

how do I change the location of a Git repository

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 w开发者_JAVA百科as dumped right in my C:/Users// directory. I prefer moving it somewhere else so how do I go about doing this?


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

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).


AFAIK, you can just move the directory (including the .git directory) with your favorite file management tool. In fact, if you don't need your working directory changes, you can just copy/move the .git directory and restore your files with git reset --hard.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜