简体   繁体   中英

How to rename GIT central repository

We have a central GIT repository in our organization. I would like to know what is the best way to rename this central repository.

Thanks!

Changing the name of a repo depends on how said repository is managed.

  • On GitHub (or BitBucket, or...), you would the the repo name through GitHub GUI admin page for that repo.
  • On a server managed by http, you would simply change the name of the root directory But you would also have to modify the httpd.conf in order to reference that new path.
    And you could duplicate that entry, if you don't want the users to be immediately impacted.
    A symlink wouldn't be enough.
  • On a server managed by ssh, simply renaming the directory is enough.

In any cases, as commented slashingweapon , you need each user to change their remote url (as described in " Changing a remote's URL ")

git remote set-url origin new-url

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM