Last active
January 21, 2019 06:44
-
-
Save jaimesangcap/c3028df72994e7ce84ccd486664de6c1 to your computer and use it in GitHub Desktop.
Git alias inspired by this article http://codersopinion.com/blog/16-awesome-git-aliases-that-you-will-love/
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
[user] | |
email = [email protected] | |
name = Jaime Sangcap | |
[core] | |
editor = vim | |
autocrlf=input | |
safecrlf=false | |
[alias] | |
# Shortening aliases | |
co = checkout | |
cob = checkout -b | |
f = fetch -p | |
c = commit | |
p = push | |
br = branch | |
ba = branch -a | |
bd = branch -d | |
bD = branch -D | |
rename = branch -m | |
dc = diff --cached | |
dw = diff --word-diff | |
amend = commit --amend -a | |
st = status | |
merge = merge --no-ff | |
# Feature improving aliases | |
sts = status -sb | |
a = add -p | |
unstage = reset HEAD -- | |
g = grep -Ii | |
conflicts = diff --name-only --diff-filter=U | |
# Complex aliases | |
plog = log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s' | |
tlog = log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
rank = shortlog -sn --no-merges | |
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment