Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
108 lines (82 sloc) 2.68 KB
# .gitconfig
[user]
email = matt@kizmeta.com
name = Matt Petty
[color]
status = auto
branch = auto
interactive = auto
diff = auto
ui = true
[github]
username = lodestone
user = lodestone
[alias]
undo = reset HEAD~1
do-over = reset --hard origin/master
st = status
ci = commit
br = branch
co = checkout
df = diff
who = shortlog -s --
lol = log --graph --decorate --date=local --pretty=format:'%h %cd (%an) %s%d'
hist = log --oneline --decorate
h = log --oneline --decorate
stp = status -sb
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lsv = log --pretty=format:'%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]' --decorate --date=short --numstat
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
chdate = "!d=\"$(date -d \"$1\")\" && shift && \
git diff-index --cached --quiet HEAD --ignore-submodules -- && \
GIT_COMMITTER_DATE=\"$d\" git commit --amend -C HEAD --date \"$d\"" \
|| echo >&2 "error: date change failed: index not clean!"
# some resets without explanation
r = reset
r1 = reset HEAD^
r2 = reset HEAD^^
rh = reset --hard
rh1 = reset HEAD^ --hard
rh2 = reset HEAD^^ --hard
# Branches ordered by last commite time:
brs = for-each-ref --sort=-committerdate --format="%(committerdate:relative)%09%(refname:short)" refs/heads
[core]
excludesfile = ~/.gitignore
quotepath = false
[mergetool]
keepBackup = true
; [difftool "sourcetree"]
; cmd = opendiff \"$LOCAL\" \"$REMOTE\"
; path =
# [mergetool "sourcetree"]
# ; cmd = /Applications/SourceTree.localized/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
# cmd = mvimdiff "$LOCAL" "$REMOTE"
# trustExitCode = true
; [difftool "Kaleidoscope"]
; cmd = ksdiff-wrapper git \"$LOCAL\" \"$REMOTE\"
; [difftool]
; prompt = false
# [difftool]
# cmd = vimdiff
[push]
default = current
[branch "master"]
rebase = true
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[web]
browser = open
# [diff]
# tool = gvimdiff
; [difftool "Kaleidoscope"]
; cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
; [mergetool "Kaleidoscope"]
; cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
; trustexitcode = true
[difftool]
tool = vimdiff
[mergetool]
tool = vimdiff
[ghi]
token = !security find-internet-password -a lodestone -s github.com -l 'ghi token' -w