Created
August 8, 2023 15:04
-
-
Save nipafx/283fcb8a7deb504d9041ce3e65c6dc22 to your computer and use it in GitHub Desktop.
My Git aliases
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] | |
st = status --branch --short | |
look = log --graph --pretty='%C(red)%h%Creset %C(green)%ad%Creset %C(yellow)%<(15,trunc)%an%Creset %s %C(bold blue)%D%Creset' --date=format-local:'%d.%m.%Y %H%M' | |
look-close = log --graph --pretty='%C(red)%h%Creset %C(green)%cd%Creset %C(yellow)%<(15)%cn%Creset %C(bold blue)%D%Creset%n %C(dim green)%ad%Creset %C(dim yellow)%<(15)%an%Creset %s' --date=format-local:'%d.%m. %H%M' | |
hist = log --pretty='%C(red)%h%Creset %C(green)%cd%Creset %C(yellow)%<(12,trunc)%an%Creset %s %C(auto)%D%Creset' --date=format-local:'%Y-%m-%d %H:%M' | |
wat = !git look -15 | |
cd = checkout | |
patch = -c interactive.diffFilter='diff-highlight | less -FRX --tabs=4' add --patch | |
unstage = reset HEAD -- | |
unstage-patch = reset HEAD --patch | |
eradicate = "!git reset --hard; git clean -fd" | |
com = commit -m | |
amend = commit --amend --no-edit | |
fixup = "!git commit --fixup=$1 #" | |
reword = commit --amend | |
reb = rebase --interactive --autosquash | |
reb-unpushed = rebase --interactive --autosquash @{upstream} | |
follow = log --follow -p | |
cp = cherry-pick | |
diff-prose = diff --word-diff --unified=5 | |
please = push --force-with-lease | |
# I also have a terminal shortcut: | |
# alias g='git st; echo ''; git wat -5' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment