我如何重命名使用gitolite创建的Git存储库? [英] How do I rename a Git repository created with gitolite?
问题描述
我使用gitolite创建了一个Git仓库。现在我想重命名该存储库。
我该怎么做?
在gitolite的自述文件中说我不应该直接在服务器上工作。但我想我必须在这种情况下在服务器上做一些工作,对吗? 正如 gitolite基本管理员手册:
重命名回购
这与此类似;没有代码可以在 gitolite
中执行此操作。你要做的是:
$ b $ ul
登录服务器 cd $ REPO_BASE
(默认值: cd〜/ repositories
)和
mv old-name .git new-name.git
回到你的gitolite-admin克隆,编辑 conf / gitolite .conf
并用 new-name
替换所有出现的 old-name
。然后像往常一样添加,提交和推送。
这两个步骤的顺序很重要;不要将它们取消: - )
gitolite3需要第三步:
gl-conf
并将存储库名称更改为新名称
当然,每个用户都应该更新自己的克隆配置,以指向新的repo名称。
I created a Git repository using gitolite. Now I would like to rename that repository.
How can I do this?
In gitolite's readme is says that I should not work directly on the server. But I guess I have to do some work on the server in this case, right?
As stated in the gitolite basic-admin manual:
renaming a repo
This is similar; there's no code to do this in gitolite
. What you do is:
log on to the server,
cd $REPO_BASE
(default:cd ~/repositories
), andmv old-name.git new-name.git
back on your gitolite-admin clone, edit
conf/gitolite.conf
and replace all occurrences ofold-name
withnew-name
. Then add, commit, and push as usual.
The order of these 2 steps is important; do not reverse them :-)
A third step is necessary on gitolite3:
- edit file
gl-conf
in the repo and change the repository name to the new name
And of course, every user should update his clone configuration to point to the new repo name.
这篇关于我如何重命名使用gitolite创建的Git存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!