开发者

how do I move my git repositories and keep the same url for cloning?

开发者 https://www.devze.com 2023-03-16 02:37 出处:网络
I currently have repositories in /home/git/repositories/flt. I can clone using git clone git@hostname:flt/root.git./home/git is the $HOME directory for the git user. I am using gitolite.

I currently have repositories in /home/git/repositories/flt. I can clone using git clone git@hostname:flt/root.git. /home/git is the $HOME directory for the git user. I am using gitolite.

I want to move the flt repos to a different path which is not the git home directory. How can I set it up so that my clon开发者_Python百科e command doesn't change? I can change git's home directory if that is necessary. Thanks.


You can change the home of the user git, of course, or you make it simple and just link to the new location. Looking at the pathes I assume, that you are using linux ;)

ln -s /path/to/new/flt.git /home/git/repositories/flt

However, I would just use the new location every time I clone the repository. I don't see a reason (except there are build-script pointing hard-coded to the old location in the wild), why one should use the old path.

0

精彩评论

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

关注公众号