0

When I setup my gitolite server back in the day, I called it gitolite.example.com and the users are asking for it to be git.example.com instead.

Question

If I change the sub domain will all the users repos continue to work?

Or do I have to change something in each of the users repos?

Jasmine Lognnes
  • 2,520
  • 8
  • 33
  • 51

1 Answers1

1

If you change the URL of the repositories you will either have to update the URL in every checked out repo on every client, or create a redirect on gitolite.example.com to redirect requests to git.example.com. This way already checked out repos will continue to work, while newly checked out repos will directly get the new URL.

To change the URL in a checked out repository you can use this command:

git remote set-url origin https://git.example.com/PATH/TO/REPOSITORY.git

The redirect obviously depends on the webserver you are using.

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89