How to move local Git repository (with history) to be managed by Gitosis on remote server?
I’m switching from SVN to Git with Gitosis installed on a central server for centralized repositories on Ubuntu server.
I have had all my SVN repositories moved and initiated into new Git repositories, and also had all history moved to Git.
Now that I have all the repositories migrated to Git, I want to add all the repositories into Gitosis to be managed by Gitosis.
2 Solutions collect form web for “How to move local Git repository (with history) to be managed by Gitosis on remote server?”
The idea is to declare you repo in the
conf/gitosis.conf file from your gitosis-admin local (cloned) repo:
[group groupname] writable = reponame members = username git add -A git ci -m "updated configuration" git push
, which will create a bare repo, to which to which you can push your local repo.
mkdir myproject cd mypyroject git init # do some work, git add and commit files # Then add your server as a remote and push: git remote add serveralias git@hostname:reponame.git git push serveralias master
See this tutorial for more
That being said, I find gitolite much more complete than gitosis, like all those recent blog posts illustrate:
- A Pure Git Deploy Workflow (with Jekyll and Gitolite)
- Git Repository Server using Gitolite
- Gitolite installation with gitweb and anongit in Gentoo and Debian
And you can migrate from gitosis to gitolite easily enough.
I recommend this tutorial for managing gitosis repositories if you have successfully installed it:
Most of the normal management work (Add new administrator, Create a new user, Create a new repository, etc) can be done on administrator’s side by editing and pushing gitosis-admin repository. You need to login to the gitosis server to do other things like adding hook script to send email automatically when somebody pushes, etc.