Skip to content

Instantly share code, notes, and snippets.

@arnabc
Created April 19, 2011 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save arnabc/926980 to your computer and use it in GitHub Desktop.
Save arnabc/926980 to your computer and use it in GitHub Desktop.
Gitosis repo creation ( it assumes that you have a working gitosis repository in a central server and have the permission to create new repositories)
~$ mkdir your_repo_name
~$ cd your_repo_name
~$ git init
~$ git remote add origin git@YOUR_SERVER_HOSTNAME:your_repo_name.git
# do some work, git add and commit files
~$ git add .
~$ git commit -m 'Your Message'
# push the new repo to central repository ( gitosis )
~$ git push origin master:refs/heads/master
# Now if you try to push git will complain that it does not know which branch to push
# do this to set the 'master' as the default target for push/pull
~$ git config branch.master.remote origin
~$ git config branch.master.merge refs/heads/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment