Skip to content

Instantly share code, notes, and snippets.

@djoudi
Forked from smahi/gist:ef60175356440dc2cfb6
Created May 8, 2014 17:27
Show Gist options
  • Save djoudi/2d5f3d123d36c361e2af to your computer and use it in GitHub Desktop.
Save djoudi/2d5f3d123d36c361e2af to your computer and use it in GitHub Desktop.

Creating Git server

Install git-core

$ sudo apt-get update
$ sudo apt-get install git-core

Create git user

$ sudo adduser git

Create the repo on the server

$ su git
$ git init --bare myproject

Create the project on the client

$ mkdir myproject
$ cd myproject
$ git init
$ touch README.md
$ git add .
$ git commit -m "Initial comit"

Pushing the project to the server

$ git remote add origin ssh://git@the_server:prot_number/home/git/myproject
$ git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment