Created
November 13, 2018 21:26
-
-
Save mattvanhorn/1a478cc1d70f61d1798e8e21a11b60e5 to your computer and use it in GitHub Desktop.
git aliases
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
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
[github] | |
user = mattvanhorn | |
token = b83e22fee5f0c4a3074e92b9cd8adb01 | |
[git-tmbundle] | |
gitx-path = /Applications/GitX.app/ | |
gitnub-path = "/Applications/GitNub.app/ " | |
[user] | |
name = Matt Van Horn | |
email = [email protected] | |
[alias] | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
st = status | |
co = checkout | |
cob = checkout -b | |
a = add | |
aa= !git add -u && git add . && git status | |
commit = commit -v | |
c = commit -m | |
ci = commit | |
ca = commit --amend -C HEAD | |
cs = commit -s | |
cp = cherry-pick | |
wip = !"git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit --no-verify -m \"wip\"" | |
unwip = !"git log -n 1 | grep -q -c wip && git reset HEAD~1" | |
cleanup = !git remote prune origin && git gc && git clean -dfx && git stash clear | |
diff = diff --patience | |
difference = diff | |
up = !git fetch origin && git rebase origin/master | |
ir = !git rebase -i origin/master | |
rmb = !sh -c 'git branch -D $1 && git push origin :$1' - | |
br = branch | |
rb = !"git wip;git rebase -i origin/master;git unwip" | |
pr = !"git fetch;git wip;git rebase --stat origin;git unwip;git heads" | |
head = !"headgit log -n1" | |
heads = !"git log origin/master.. --format='%Cred%h%Creset;%C(yellow)%an%Creset;%H;%Cblue%f%Creset' | git name-rev --stdin --always --name-only | column -t -s';'" | |
lost = !"git fsck | awk '/dangling commit/ {print $3}' | git show --format='SHA1: %C(yellow)%h%Creset %f' --stdin | awk '/SHA1/ {sub(\"SHA1: \", \"\"); print}'" | |
whatadded = lostg --diff-filter=A | |
who = shortlog -n -s --no-merges | |
[apply] | |
whitespace = nowarn | |
[merge] | |
tool = opendiff | |
[push] | |
default = simple |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment