Skip to content

Commit 1ddf4e3

Browse files
committed
Add git tidy alias
1 parent 52c3692 commit 1ddf4e3

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

config/git/config

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,21 @@
5959
l = log --graph --abbrev-commit --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
6060
ld = "!sh -c \"git log --since '${1:-1} days ago' --oneline --author $(git config user.email)\" -"
6161
ll = log --graph --abbrev-commit --pretty=oneline
62-
lm = log --pretty=format:'* %s (%h)'
62+
lm = log --reverse --pretty=format:'* %s (%h)'
6363
now = "!f() { GIT_SEQUENCE_EDITOR=: git rebase -i HEAD~${1:-1} --exec \"git commit --amend --no-edit --date=\\\"$(date)\\\"\"; }; f"
6464
p = push
6565
patch = !git --no-pager diff --no-color
6666
pf = push --force
67-
rv = remote -vv
68-
rh = reset --hard HEAD
6967
ra = rebase --abort
7068
rc = rebase --continue
71-
squash-all = "!f() { git reset $(git commit-tree HEAD^{tree} -m \"${1:-Initial commit}\"); }; f"
69+
rh = reset --hard HEAD
70+
rv = remote -vv
7271
s = status
7372
show-ignored = !git clean -ndX | perl -pe 's/Would remove //'
73+
squash-all = "!f() { git reset $(git commit-tree HEAD^{tree} -m \"${1:-Initial commit}\"); }; f"
7474
sshort = "!f() { git show --shortstat \"${1:-HEAD}\" | awk \"/files? changed/ { gsub(/,/, \\\"\\\", \\$4); gsub(/,/, \\\"\\\", \\$6); print \\\"\\033[32m+\\\" \\$4 \\\" \\033[31m-\\\" \\$6 \\\"\\033[0m\\\" }\"; }; f"
75+
tidy = "!f() { GIT_SEQUENCE_EDITOR=: git rebase -i HEAD~${1:-1} --exec \"git commit --amend -m \\\"\\$(git log --format=%s -1)\\\" --date=\\\"\\$(date)\\\"\"; }; f"
76+
ignored = check-ignore -v -n
7577

7678
[diff]
7779
renames = copies

0 commit comments

Comments
 (0)