user1801669
user1801669

Reputation: 163

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!

Upvotes: 3

Views: 248

Answers (1)

VonC
VonC

Reputation: 1323145

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

Upvotes: 2

Related Questions