Created
April 20, 2016 19:20
-
-
Save ryanirelan/d9ea70131e5f4f544858356b3e7ac58c to your computer and use it in GitHub Desktop.
git-alias
This file contains 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] | |
zip = archive --format=zip -o latest.zip HEAD | |
yesterday = log --before={`date \"+%Y-%m-01\"`} --after={`date -v-1m \"+%Y-%m-01\"`} | |
st = status | |
b = branch | |
p = pull | |
lg = log | |
type = cat-file | |
r = remote | |
unstage = reset | |
alist = "!alistalias() { git config --global --get-regexp alias | awk -v nr=2 '{sub(/^alias\\./,\"\")}; {printf \"\\033[31m%_10s\\033[1;37m\", $1}; {sep=FS};{for (x=nr; x<=NF; x++) {printf \"%s%s\", sep, $x; }; print \"\\033[0;39m\"}'; }; alistalias" | |
finda = "!grepalias() { git config --global --get-regexp alias | grep -i \"$1\" | awk -v nr=2 '{sub(/^alias\\./,\"\")};{printf \"\\033[31m%_10s\\033[1;37m\", $1};{sep=FS};{for (x=nr; x<=NF; x++) {printf \"%s%s\", sep, $x; }; print \"\\033[0;39m\"}'; }; grepalias" | |
rh = reset HEAD | |
c = commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment