User Tools

Site Tools


GIT with

Official Homepage
The first thing you need is a Account.

After that look if you already have a public key file:

locate *.pub | grep ~/.ssh

If you dont have a pair of keys just create one:

ssh-keygen -t rsa -C ""

Then you have to add your public key in your Account settings.

First Settings

Test the validation of your key by typing:


You should be able to successfully connect.

After that set your username and email:

git config --global "Firstname Lastname"
git config --global ""

Set up your token:

git config --global github.user username
git config --global github.token 0123456789yourf0123456789token

You will find your token in your Account Settings.

Creating a repositoriy

Repositorities are created on your github Homepage.

Adding Files to your Repositority

mkdir Test_Project_2
cd Test_Project_2
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin
git push -u origin master

Adding commits

cd /yourproject 
git commit -a -m 'second commit'
git push

Forking a Project

If you fork a Project you get a copy of the master and you can bild your own fork.

working on the master

git clone
# only do the next line if you want to get the upstream from the original project:
git remote add upstream git://
git fetch upstream

Push commits

git push origin master

Using git on Windows

Its practically the same. You just have to install the officiall windows git application
and then you can user the git-bash to do exactly the same as in linux.

linux/git.txt · Last modified: 2011/09/30 20:52 by