Git Setup Cheatsheet
I had to setup several new machines during the past few months and at some point I got tired googling for the same websites every time I have to set up GIT. So I decided to write my Git Setup Cheatsheet:
$ git config --global user.name "John Doe" $ git config --global user.email email@example.com
$ git config --global core.editor "atom --wait"
Git Terminal Shortcuts
.gitconfig in my home:
[alias] co = checkout ci = commit st = status br = branch hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short type = cat-file -t dump = cat-file -p
A more up-to-date version of this file can be found in this gist.
Git Commands and Branch Names Auto-completion:
Get the auto-completion script:
$ curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
Set it up in my
if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi
GitHub Keyboard Shortcuts
Add SSH to GitHub