Git tutorial #1
Initialise the repository on the remote server:
ssh git@yourserver.com
mkdir test/project1
cd test/project1
git init --bare
On the local host:
cd somedir/project1
git init
echo some text > somefile.txt
git add somefile.txt
git commit -s -m "my very 1st commit"
git remote add origin git@yourserver.com:test/project1
git push -u origin master
Clone the project on another host:
git clone git@yourserver.com:test/project1
cd project1
Based on http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push/
Leave a Reply