Last active
February 13, 2016 22:12
-
-
Save datakop/c68af973af5b1f80de6d to your computer and use it in GitHub Desktop.
My GIT configuration.
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] | |
name = Boris Kopin | |
email = [email protected] | |
[core] | |
editor = vim | |
[color] | |
branch = auto | |
diff = auto | |
interactive = auto | |
status = auto | |
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
type = cat-file -t | |
dump = cat-file -p | |
# Pretty log functions: | |
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg = !"git lg1" | |
# Cancel HEAD commit: | |
cancel = reset --soft HEAD^ | |
# Rename commit msg of HEAD: | |
rename = commit --amend | |
# Make commits tree diff between two branches. | |
brdiff = !git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative $1..$2 | |
# order git branches by most recent commit | |
brl = !git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/ | |
# Clean remote branches (safety function, exec 'git fetch --all' to update) | |
clean-remotes = !rm -r .git/refs/remotes/* .git/logs/refs/remotes/* | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = red | |
[push] | |
default = matching |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment