Last active
September 13, 2016 18:41
-
-
Save joeshaw/1efa84954539eb72d66f7520a4ca9569 to your computer and use it in GitHub Desktop.
partial .gitconfig
This file contains hidden or 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
[alias] | |
find = !sh -c 'git ls-files |grep --color=auto -i "$@" |less -FRSX' - | |
fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f" | |
squash = "!f() { TARGET=$(git rev-parse "$1"); git commit --squash=$TARGET ${@:2} && git rebase -i --autostash --autosquash $TARGET^; }; f" | |
ri = rebase --interactive --autosquash --autostash | |
lt = log --graph --pretty=changes | |
ll = log --numstat --pretty=changes | |
ds = diff --staged | |
ego = shortlog -s -n --no-merges | |
pr = pull-request | |
rbs = !git for-each-ref --sort=committerdate --format='%(refname:short) * %(authorname) * %(committerdate:relative)' refs/remotes/ | column -t -s '*' | |
undo = reset HEAD^ | |
fpr = "!pr() { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }; pr" | |
append = commit --amend --no-edit | |
reword = commit --amend --reedit-message HEAD | |
reauthor = commit --amend --no-edit --reset-author | |
[pretty] | |
changes = format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Append is proving the most used so far