Git via github.com


1. Github.com

1.1 Local Repository

step by step

1.2 Installing Gits

1.3 Git sides

Cheatsheet

2. Branching

# create a branch
git checkout -b testside
# Edit, add and commit your files.
git push -u origin testside

# commiting and push normally but use this:
git push origin testside # not master
# change to the master branch
git checkout master
# merge the testside branch INTO the master
git merge testside
# push the new master to github
git push origin master
# cheange back to testside via
git checkout testside

3. Working with ssh keys

a) create key via ssh-keygen -t rsa -b 4096 -C "your_email@domain.com" if you dont have one b) copy the *.pub key to github.com (account - settings - ssh und gpg keys) c) do nano ~/.ssh/config and add

host github.com
 HostName github.com
 IdentityFile ~/.ssh/id_rsa
 User git

d) chmod 660 .ssh/config

# looks like this
git clone git@github.com:nanozoo/bx_guppy_gpu.git

e) change http to git@

git remote set-url origin git@github.com:USERNAME/REPONAME.git