Setup Git

Local settings ***

git config —global user.name "Stefan van der Walt" git config —global user.email stefan@sun.ac.za

Sharing a repository over http ***

To enable syncing over http, you need to run

git --bare update-server-info

in the repo - git needs the additional information to address the stateless nature of http.

Setting up aliases ***


(16:22:40) DavidC: Here is what I have in my $HOME/.gitconfig for aliases
(16:22:42) DavidC: [alias]
    ci = commit
    di = diff --color-words
    st = status
    co = checkout

Github authentication problems ***

$ git push origin master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
error: failed to push to 'git@github.com:...'

Fix:

$ cd ~/.ssh
$ ssh-add id_rsa

sub-sahara africa
subrahaman
sahara trip IanKnot rainbow