Last active
January 20, 2023 08:54
-
-
Save albertogarrido/3a41dae46c61ac3a8a820e09814470b0 to your computer and use it in GitHub Desktop.
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] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = red reverse | |
local = blue | |
remote = green | |
[color "diff"] | |
meta = yellow | |
frag = magenta | |
old = red bold | |
new = green | |
plain = white | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
[alias] | |
st = status -s | |
cl = clone | |
ci = commit | |
co = checkout | |
cob = checkout -b | |
br = branch | |
r = reset | |
gr = grep -Ii | |
ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative | |
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat | |
lc = "!f() { git ll "$1"^.."$1"; }; f" | |
lnc = log --pretty=format:"%h\\ %s\\ [%cn]" | |
fl = log -u | |
filelog = log -u | |
ac = !git add -A && git commit -m | |
aca = !git add -A && git commit --amend | |
d = diff | |
ds = diff --stat | |
dc = diff --cached | |
a = add | |
ap = add -p | |
aa = add . | |
s = status -s | |
co = checkout | |
# list branches sorted by last modified | |
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'" | |
# list aliases | |
alias = "!git config -l | grep alias | sort | cut -c 7-" | |
save = !git add -A && git commit -m 'chore: savepoint' | |
undo = reset HEAD~1 --mixed | |
res = !git reset --hard | |
done = !git push origin HEAD | |
lg = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30 | |
[core] | |
editor = /usr/bin/vim | |
[init] | |
defaultBranch = main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment