Like us on Facebook!

Monday, 8 April 2013

quick GIT setup

Redhat Linux 6.x x86_64

There must be a git server with your repo created.

    [create public sshkey and add to git server http://gitorious.world.com/\] ssh-keygen -t dsa
    [serv@server01 ~]$ cat ~/.ssh/id_dsa.pub
    [create /workingdir/ or your chosen working directory]

    [install git] yum install git.x86_64
    [initlialise it git first outside your working directory] git init
    [setup your username] git config --global user.name "Hello World"
    [set up your email] git config --global user.email "server@world.com"
    [command to add your git project locally] git remote add origin git@gitorious.world.com:project.git
    [for error: src refspec master does not match any.]
        cd workingdirectory
        touch README
        add README
        git add .
        git commit -m 'initital commit' or git commit -m 'reinititalized files'
        git push origin master --force or git push origin master

On the git server add the SSH key and you should be good to go.


No comments:

Post a Comment

Have your say!