Git Cheatsheet – setup
Setup
git clone <repo>
clone the repository specified by <repo> ; this is similar to “checkout” in
some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
Highlight whitespace in diffs
[color]
ui = true
[color "diff"]
whitespace = red reverse
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
Add aliases to your ~/.gitconfig file:
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
Advertisement