Skip to content

Instantly share code, notes, and snippets.

@Alexey-Architect
Last active September 6, 2017 22:13
Show Gist options
  • Save Alexey-Architect/e6d7a5d3227549c4ea9eb65aa1c80a30 to your computer and use it in GitHub Desktop.
Save Alexey-Architect/e6d7a5d3227549c4ea9eb65aa1c80a30 to your computer and use it in GitHub Desktop.
GIT console aliases & nice formatting log
[push]
default = current
[core]
autocrlf = input
safecrlf = false
[alias]
last = log -3 HEAD
st = status -sb
cm = commit
br = branch
bra = branch -a
co = checkout
df = diff --color
dc = diff --color --cached
who = shortlog -s
lg = log --graph --pretty=format:'%C(yellow)%h%C(bold yellow) %C(bold magenta)%s %Creset%C(yellow)%ad|%ar %C(bold blue)<%an>%Creset' --date=short
lga = log --graph --pretty=format:'%C(yellow)%h%C(bold yellow)%d %C(bold magenta)%s %C(bold blue)<%an>%Creset' --date=short --all
lgf = log --graph --pretty=format:'%C(yellow)%h%C(bold yellow) %C(bold magenta)%s %Creset%C(yellow)%ad|%ar %C(bold blue)<%an>%Creset' --date=short --name-status
lgaf = log --graph --pretty=format:'%C(yellow)%h%C(bold yellow)%d %C(bold magenta)%s %C(bold blue)<%an>%Creset' --date=short --all --name-status
git = "!f() { git \"$@\"; }; f"
# coloring!
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[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