Last active
November 7, 2019 10:23
-
-
Save gidgid/fdab1fe425b3064f262b76d42cd65a30 to your computer and use it in GitHub Desktop.
More aliases
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] | |
# commits | |
## show me my diff while writing the commit message | |
ct = commit --verbose | |
## "commit add" add all files then commit | |
cta = commit -a --verbose | |
## amend is slightly long but it felt natural this way | |
amend = commit --verbose --amend | |
## you can combine actions like this: | |
## "add amend" - first add, then amend | |
aamend = !git add -A && git commit --amend | |
## "add untracked amend" - add files except for untracked, then amend | |
aumned = !git add -u && git commit --amend | |
# diffs | |
## plain old diff | |
df = diff | |
## "diff working with stage" - diff with the staging area | |
dfws = diff --staged | |
## "diff stage with last commit" | |
dfsc = diff --staged HEAD | |
## "diff current with last commit" | |
dflc = diff HEAD^ HEAD | |
## "diff names" - show diff only with file names | |
dfnames = diff --name-only | |
# logs | |
## "log pretty" - dont worry too much about the formatting | |
lgp = log --oneline --graph --decorate --pretty=format:\"%C(auto)%d%C(reset) %s %C(magenta)(%ar)%C(reset) %C(cyan)%h%C(reset) %C(red)[%cn]%C(reset)\" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment