Rename A Gitosis Repository
28 May 2009
I use gitosis for private git repository hosting (and it’s awesome). If you are interested, this great tutorial will walk you through setting it up yourself.
I recently needed to rename one of my repositories and couldn’t find any info on how to do it, so here is a walk-thru. I will demonstrate the steps of renaming a repository called “tk” to “show-time”.
Rename project in gitosis.conf
Before:
[group main]
writable = tk
After:
[group main]
writable = show-time
Push changes
git push origin master
Connect to gitosis server and rename correct folder
cd /home/git/repositories
mv tk show-time
Change the remote reference in all repository clones
cd /src/show-time
git remote rm origin
git remote add origin git@example-git-server.com:show-time.git
Done and done.