Archive

Archive for the ‘git’ Category

SETUP GIT REPO

12 July, 2011 Comments off

ADDING KEY TO SERVER

scp ~/.ssh/id_rsa.pub git@myserver.com:~/.ssh/authorized_keys

SERVER

sudo mkdir /home/git/myrepo
cd /home/git/myrepo
sudo git --bare init
sudo chown -R git:git /home/git/myrepo

CLIENT

mkdir myrepo
cd myrepo
git init

# add some files

git add .
git commit -m "added some files"

git remote add origin git@myserver.com:myrepo
git push origin master

rm -r myrepo/
git clone git@yourserver.com:myrepo

Advertisements
Categories: git