How do I rename a Git repository created with gitolite?

后端 未结 4 1110
暗喜
暗喜 2021-01-30 02:50

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 d

4条回答
  •  囚心锁ツ
    2021-01-30 03:28

    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), and

      mv old-name.git new-name.git

    • back on your gitolite-admin clone, edit conf/gitolite.conf and replace all occurrences of old-name with new-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.

提交回复
热议问题