Last active
December 24, 2015 10:49
-
-
Save seanmcmills/6786579 to your computer and use it in GitHub Desktop.
.gitconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Sean McMills | |
email = seanmcmills@me.com | |
[core] | |
quotepath = false | |
excludesfile = /Users/seanmcmills/.gitignore_global | |
[difftool "Kaleidoscope"] | |
cmd = ksdiff-wrapper git \"$LOCAL\" \"$REMOTE\" | |
[mergetool "sourcetree"] | |
cmd = /usr/local/bin/ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot | |
trustExitCode = true | |
[diff] | |
tool = Kaleidoscope | |
[color] | |
ui = true | |
[color "branch"] | |
current = yellow black | |
local = yellow | |
remote = magenta | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red reverse | |
new = green reverse | |
whitespace = white reverse | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan reverse | |
branch = magenta | |
[filter "media"] | |
clean = git-media-clean %f | |
smudge = git-media-smudge %f | |
[push] | |
default = nothing | |
[alias] | |
ds = diff --staged # git ds - diff your staged changes == review before committing. | |
st = status -sb # smarter status - include tag and branch info | |
fup = log --since '1 day ago' --oneline --author <YOUR_EMAIL> # I know what you did yesterday - great for follow-ups | |
ls = log --pretty=format:"%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]" --decorate --date=short # pretty one-line log with tags, branches and authors | |
lsv = log --pretty=format:"%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]" --decorate --date=short --numstat # a verbose ls, shows changed files too | |
# some resets without explanation | |
r = reset | |
r1 = reset HEAD^ | |
r2 = reset HEAD^^ | |
rh = reset --hard | |
rh1 = reset HEAD^ --hard | |
rh2 = reset HEAD^^ --hard | |
# basic shortcuts | |
cp = cherry-pick | |
cl = clone | |
ci = commit | |
co = checkout | |
br = branch | |
diff = diff --word-diff | |
dc = diff --cached | |
# stash shortcuts | |
sl = stash list | |
sa = stash apply | |
ss = stash save | |
# log related - thanks to @mwd410 | |
l = log | |
lh = log --graph | |
la = !git lh --date-order --all 2> /dev/null | |
lb = log --graph --simplify-by-decoration | |
lba = !git lb --all | |
h = !git --no-pager log --graph -n 15 | |
a = !git --no-pager la -n 15 | |
lgo = log --oneline -20 --decorate | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment