bulkanix

Setting up a git repository on Slicehost

On your slice;


  1. Install git.

    sudo apt-get install git-core

  2. Create an empty directory for your repository

    mkdir myrepo.git && cd myrepo.git

  3. Initialize git

    git init

On your local machine


  1. Create an empty directory for your repository

    > mkdir myrepo.git && cd myrepo.git

  2. Initialize git

    git init

  3. Add the remote repository as the origin

    git remote add origin ssh://server-domain/repo

    for my server the above command is

    git remote add origin ssh://bulkan-evcimen.com/home/bulkan/src/repo.git

  4. Create a ignore file for the first push

    touch .gitignore

  5. Add, commit

    git add .gitignore

    git commit -m "initial git commit"

  6. Push your repo to the origin on slicehost

    git push origin master

That's it. Happy gitting.

Comments

Josh Fraser - 2009-11-23 08:35:39
Thanks for posting this. Very helpful. How do you specify a custom port to use if you are not using the default?

Bulkan Evcimen - 2009-11-24 09:29:58
Hi Josh, This setup here uses git via ssh (port 22) to run on a different port you might need to use the git protocol. Have a look here it might help

Post a comment

a,b tags are allowed, rest are stripped
Email wont be spammed.I promise

CSS Layout by Rambling Soul