Created
June 7, 2018 10:24
-
-
Save numantariq/ad732588223b80eee0fe55825a0feff7 to your computer and use it in GitHub Desktop.
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
# This is Git's per-user configuration file. | |
[user] | |
# Please adapt and uncomment the following lines: | |
name = Nouman Tariq | |
email = numantariq@gmail.com | |
[core] | |
excludesfile = ~/.gitignore_global | |
[alias] | |
# Log aliases | |
l = log --pretty=format:\"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]\" --decorate --date=short | |
lg = log --oneline --decorate --graph --all | |
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative | |
s = status | |
# Checkout aliases | |
co = checkout | |
cob = checkout -b | |
# Commit aliases | |
cam = commit -a -m | |
# List branches by last modified | |
blm = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'" | |
# List all aliases | |
la = "!git config -l | grep alias | cut -c 7-" | |
# Clear all merged branches | |
cu = !git branch --merged | egrep -v \"(^\\*|master|develop|development)\" | xargs git branch -d | |
# Branch name | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" | |
# Push tag to remote | |
publish-tag = push origin | |
# color {{{ | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = red | |
local = blue | |
remote = green | |
[color "diff"] | |
meta = yellow | |
frag = magenta | |
old = red bold | |
new = green | |
plain = white | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
# }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment