Skip to content

Instantly share code, notes, and snippets.

@coridrew
Created July 6, 2021 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coridrew/1e480c8cbf2a5a7984066860151e4bae to your computer and use it in GitHub Desktop.
Save coridrew/1e480c8cbf2a5a7984066860151e4bae to your computer and use it in GitHub Desktop.
[user]
name = YOUR NAME
email = YOUR EMAIL
[core]
editor = code --wait
hooksPath = /Users/YOUR-USER-FOLDER/hooks
mergeoptions = --no-edit
[diff]
tool = p4merge
stat = true
[difftool]
prompt = false
keepBackup = false
trustExitCode = true
keepTemporaries = false
[difftool "bc3"]
cmd = /usr/local/bin/bcomp --expandall --solo $LOCAL $REMOTE
[difftool "p4merge"]
cmd = /Applications/p4merge.app/Contents/MacOS/p4merge "$LOCAL" "$REMOTE"
[merge]
tool = p4merge
stat = true
[mergetool]
prompt = false
keepBackup = false
trustExitCode = true
keepTemporaries = false
[mergetool "bc3"]
cmd = /usr/local/bin/bcomp --expandall --solo $LOCAL $REMOTE $BASE -mergeoutput=$MERGED
[mergetool "p4merge"]
cmd = /Applications/p4merge.app/Contents/MacOS/p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[alias]
diffdir = difftool --dir-diff --tool=bc3 --no-prompt --no-symlinks
bprune = !git branch --merged | egrep -v '(^\\*|gibberish)' | xargs git branch -d
a = add -A
b = branch
c = checkout
f = fetch
l = log --pretty=oneline --abbrev-commit
r = rebase --interactive HEAD~10
s = status
sp = -p status
pr = pull --rebase
pom = push origin master
pos = push origin source
rc = rebase --continue
ra = rebase --abort
ss = -p status -s
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lga = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all
ll = log --pretty=oneline --abbrev-commit --max-count=15
lc = log --stat --summary
tpr = tf pull --rebase --deep
tcd = tf checkin --deep
prune = fetch --prune
aliases = config --get-regexp alias
amend = commit --amend
bl = blame -w -M -C
bra = branch -rav
branches = branch -rav
filelog = log -u
hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) [%an]%Creset' --abbrev-commit --date=relative
last = log -p --max-count=1 --word-diff
lastref = rev-parse --short HEAD
lasttag = describe --tags --abbrev=0
pick = add -p
remotes = remote -v show
stage = add
statusSB = status -sb
standup = log --since yesterday --oneline --author 'coridrew'
stats = diff --stat
sync = ! git fetch upstream -v && git fetch origin -v && git checkout master && git merge upstream/master
timesheet = reflog --pretty=format:'(%cd) %h - %d %s [%an]' --abbrev-commit --date-order --date=local --author=cori
ts = reflog --pretty=format:'(%cd) %h - %d %s [%an]' --abbrev-commit --date-order --date=local --author=cori
timesheetPretty = reflog --pretty=format:'%Cgreen(%cd) %Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue) [%an]%Creset' --abbrev-commit --date-order --date=local --author=cori
tsp = reflog --pretty=format:'%Cgreen(%cd) %Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue) [%an]%Creset' --abbrev-commit --date-order --date=local --author=cori
timesheetAll = reflog --pretty=format:'(%cd) %h - %d %s [%an]' --abbrev-commit --date-order --date=local
tsa = reflog --pretty=format:'(%cd) %h - %d %s [%an]' --abbrev-commit --date-order --date=local
timesheetAllPretty = reflog --pretty=format:'%Cgreen(%cd) %Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue) [%an]%Creset' --abbrev-commit --date-order --date=local
tsap = reflog --pretty=format:'%Cgreen(%cd) %Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue) [%an]%Creset' --abbrev-commit --date-order --date=local
undo = reset head~
unstage = reset HEAD
wdiff = diff --word-diff
who = shortlog -s -e --
up = !git fetch --all --prune && git rebase origin/master && git submodule update && git push . origin/master:master 2> /dev/null
pub = !git push origin HEAD:master && git push . HEAD:master && git checkout master
cb = checkout -b
fap = fetch --all --prune
pp = pull --prune
tprs = tf pull --rebase --shallow
tcds = tf checkin --shallow
[color]
branch = auto
diff = auto
status = 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
[rerere]
enabled = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment