Created
March 17, 2026 14:45
-
-
Save dmitrylitmanovich/7c836cb9d4ab079aba38772d89984939 to your computer and use it in GitHub Desktop.
Git useful aliases (~/.gitconfig)
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
| [alias] | |
| # Basics | |
| st = status -sb | |
| co = checkout | |
| br = branch | |
| cp = cherry-pick | |
| # Logging | |
| lg = log --oneline --graph --decorate --all | |
| ll = log --oneline -20 | |
| who = shortlog -sn --no-merges | |
| # Diffing | |
| df = diff | |
| ds = diff --staged | |
| dw = diff --word-diff | |
| # Committing | |
| cm = commit -m | |
| ca = commit --amend --no-edit | |
| fixup = commit --fixup | |
| # Branching | |
| new = checkout -b | |
| gone = branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -d | |
| # Stashing | |
| sl = stash list | |
| sp = stash pop | |
| ss = stash save | |
| # Rebasing | |
| ri = rebase -i | |
| rc = rebase --continue | |
| ra = rebase --abort | |
| # Undo | |
| undo = reset HEAD~1 --mixed | |
| nuke = reset HEAD~1 --hard | |
| unstage = restore --staged . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment