ref(git-config): aliases

This commit is contained in:
TheK4n 2023-10-27 13:57:39 +03:00
parent 94657335b5
commit c44a47074f

View File

@ -22,10 +22,13 @@
grep = auto grep = auto
ui = auto ui = auto
[advice]
addEmptyPathspec = false
[alias] [alias]
a = "!git status --short | fzf | awk '{print $2}' | xargs git add" a = "!git ls-files -m | fzf | xargs git add"
d = "!git diff --color=always | bash -c \"$PAGER\"" d = diff
ds = "!git diff --staged --color=always | bash -c \"$PAGER\"" ds = diff --staged
dno = diff --name-only dno = diff --name-only
co = checkout co = checkout
ci = commit ci = commit
@ -33,20 +36,15 @@
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)" pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"
st = status st = status
br = branch br = branch
ba = branch -a
bm = branch --merged bm = branch --merged
bn = branch --no-merged bn = branch --no-merged
hist = log --pretty=format:\"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)\" --graph --date=relative --decorate --all --color=always hist = log --pretty=format:\"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)\" --graph --date=relative --decorate --all --color=always
hs = "!git hist | head" hs = "!git hist | head"
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}" df = "!f() { git log --pretty=format:\"%h %cd [%cn] %s%d\" --date=relative | fzf | awk '{print $1}' | xargs -I {} git diff {}^ {}; }; f"
llog = log --graph --name-status --pretty=format:\"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset\" --date=relative
open = "!hub browse"
type = cat-file -t type = cat-file -t
dump = cat-file -p dump = cat-file -p
find = "!f() { git log --pretty=format:\"%h %cd [%cn] %s%d\" --date=relative -S'pretty' -S\"$@\" | peco | awk '{print $1}' | xargs -I {} git diff {}^ {}; }; f"
unstage = "reset HEAD --" unstage = "reset HEAD --"
last = log -1 HEAD last = log -1 HEAD
branches = branch -avv --list
# edit conflicted file on merge # edit conflicted file on merge
edit-unmerged = "!$EDITOR $(git ls-files --unmerged | cut -f2 | sort -u)" edit-unmerged = "!$EDITOR $(git ls-files --unmerged | cut -f2 | sort -u)"