Created
February 17, 2024 09:52
-
-
Save filipgorczynski/f82630a9d887472346870b5238f584c4 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
[alias] | |
st = status | |
ci = commit | |
br = branch -v | |
co = checkout | |
df = diff | |
lg = log -p | |
up = pull | |
who = shortlog -s -- | |
diff = diff --no-prefix | |
recent = ! git branch --sort=-committerdate --format=\"%(committerdate:relative)%09%(refname:short)\" | head -10 | |
smartlog = log --graph --pretty=format:'commit: %C(bold red)%h%Creset %C(red)[%H]%Creset %C(bold magenta)%d %Creset%ndate: %C(bold yellow)%cd %Creset%C(yellow)%cr%Creset%nauthor: %C(bold blue)%an%Creset %C(blue)[%ae]%Creset%n%C(cyan)%s%n%Creset' | |
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short | |
llog = log --pretty=\"format:%C(yellow normal)%h %Cgreen%an %C(cyan normal)(%ci) %Creset%s\" | |
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -" | |
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short | |
getp = !sh -c 'git diff --no-prefix $1^ $1' - | |
tags = for-each-ref refs/tags/ --format=\"(%(taggerdate)) %(tag) %(subject)\" --sort=\"taggerdate\" | |
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f" | |
wu = log --stat origin..@{0} | |
wup = log -p origin..@{0} | |
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads | |
out = log --pretty=oneline --abbrev-commit --graph @{u}.. | |
in = !git fetch && git log --pretty=oneline --abbrev-commit --graph ..@{u} | |
glog = log --pretty=oneline --graph --decorate --simplify-by-decoration --all --stat | |
gtef = git log --pretty=format: --name-only | sort | uniq -c | sort -rg | head -10 | |
gten = git log --pretty=format: --name-only | sort | uniq -c | sort -rg | head -50 | grep NAME | |
grmremote = git fetch -p && for branch in `git branch -vv --no-color | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment