setup git server

Using git with ubuntu server:

assumptions:
-git repo is in /opt/git/
-ssh is working
-you have right access to the location
-commands are mentions between brackets.

steps:
On the server:
1-go to /opt/git (cd /opt/git).
2-create a directory for your project (mkdir myproj).
3-go inside the directory(cd myproj).
4-create a bare one(git init --bare).
On the local machine:
5-clone your project(git clone username@yourgitserver:/opt/git/myproj).
6-go inside the cloned project (cd myproj).
7-do some work (echo "hello" >> test.txt).
8-(git add test.txt).
9-(git commit -m "your comments here")
10-git push origin master:master
11-now your server is ready.



Comments

Popular Posts