Skip to content

Instantly share code, notes, and snippets.

@heyJordanParker
Last active April 14, 2020 23:06
Show Gist options
  • Select an option

  • Save heyJordanParker/703a4c4f4e882eeea703 to your computer and use it in GitHub Desktop.

Select an option

Save heyJordanParker/703a4c4f4e882eeea703 to your computer and use it in GitHub Desktop.
Git Config
[push]
default = simple
[fetch]
prune = true
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
st = status -sb
sh = show --oneline --stat
clone = clone --recursive
amend = commit -a --amend
ec = config --global -e
ours = "!f() { git co --ours $@ && git add $@; }; f"
theirs = "!f() { git co --theirs $@ && git add $@; }; f"
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged"
assumeall = "!git st -s | awk {'print $2'} | xargs git assume"
grep = grep -Ii
f = "!git ls-files | grep -i"
root = "rev-parse --show-toplevel"
gra = "!f() { TOPLEVEL=$(git root) && cd \"$TOPLEVEL\"; }; f"
filelog = log -u
fl = log -u
undo = reset HEAD~1 --mixed
cm = !git add -A && git commit -m
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
co = checkout
cob = checkout -b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment