Last active
December 31, 2015 03:29
-
-
Save rafi/7927793 to your computer and use it in GitHub Desktop.
my ~/.gitconfig
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
| # .-. .-. .-. .-. .-. .-. .-. .-. .-. | |
| # `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' | |
| # | |
| # Git config | |
| # https://github.com/rafi/.config | |
| # | |
| [user] | |
| name = Your Name | |
| email = [email protected] | |
| [github] | |
| user = youruser | |
| [core] | |
| pager = /usr/bin/less -EFRSX | |
| # Do NOT auto-convert CRLF line endings into LF | |
| autocrlf = false | |
| # Do NOT check if converting CRLF is reversible | |
| safecrlf = false | |
| # Whitespace detection: | |
| # - Spaces at the end of a line | |
| # - Spaces before tabs at the beginning of a line | |
| whitespace = trailing-space,space-before-tab | |
| #whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| [credential] | |
| helper = cache --timeout=3600 | |
| [init] | |
| templatedir = ~/.config/git/template | |
| [http] | |
| # Do NOT verify the SSL certificate when fetching or pushing over HTTPS | |
| # sslVerify = false | |
| [push] | |
| # Defines the action git push should take if no refspec is explicitly given: | |
| # current = Push the current branch to update a branch with the same name on the receiving end | |
| default = current | |
| [hooks "ctags"] | |
| enabled = false | |
| [rerere] | |
| enabled = true | |
| [diff] | |
| renames = copies | |
| mnemonicprefix = true | |
| tool = bc3 | |
| [difftool] | |
| bc3 = trustExitCode | |
| [merge] | |
| tool = bc3 | |
| summary = true | |
| stat = true | |
| [mergetool] | |
| prompt = false | |
| keepBackup = false | |
| bc3 = trustExitCode | |
| [gui] | |
| fontdiff = -family \"Liberation Mono\" -size 9 -weight normal -slant roman -underline 0 -overstrike 0 | |
| [web] | |
| browser = google-chrome-stable | |
| [browser "google-chrome-stable"] | |
| cmd = "/usr/bin/google-chrome-stable" | |
| [color] | |
| ui = true | |
| pager = true | |
| showbranch = true | |
| diff = auto | |
| status = auto | |
| branch = auto | |
| interactive = auto | |
| [color "branch"] | |
| plain = yellow | |
| current = magenta bold | |
| local = blue bold | |
| remote = white | |
| upstream = green bold | |
| [color "diff"] | |
| plain = normal | |
| meta = blue | |
| frag = magenta bold | |
| func = yellow ul | |
| old = red | |
| new = green bold | |
| commit = yellow | |
| whitespace = red reverse | |
| [color "status"] | |
| header = black bold | |
| added = green bold | |
| changed = red | |
| untracked = blue bold | |
| branch = green bold | |
| nobranch = red | |
| [alias] | |
| s = status -sb | |
| f = fetch --prune | |
| c = commit -v | |
| cm = commit -vm | |
| br = branch | |
| st = status | |
| ck = checkout | |
| d = diff | |
| ds = diff --staged | |
| dw = diff --color-words | |
| dh = diff --color-words HEAD | |
| w = whatchanged --decorate | |
| wp = whatchanged --decorate -p | |
| #============================================================================== | |
| sm = submodule | |
| smu = submodule foreach git pull origin master | |
| lcrev = log --reverse --no-merges --stat @{1}.. | |
| lcp = diff @{1}.. | |
| #============================================================================== | |
| count = shortlog -sn | |
| post = !sh -c 'git format-patch --stdout $1 | ix' - | |
| alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t => \\2/' | sort | |
| #============================================================================== | |
| tree = log --graph --all --oneline --decorate | |
| lb = log --graph --simplify-by-decoration --pretty=format:'%C(auto)%d' --all | |
| lg = !git lgd --all | |
| lgd = log --graph --pretty=format:'%C(bold black)%h%Creset -%C(auto)%d%Creset %s %C(bold black)(%an %ar)%Creset' | |
| #============================================================================== | |
| logx = log --all --graph --decorate=short --color --format=format:'%C(bold blue)%h%C(reset)+%C(dim black)(%cr)%C(reset)+%C(auto)%d%C(reset)++\n+++ %C(bold black)%an%C(reset)%C(black):%C(reset) %s' | |
| vtree = !bash -c '" \ | |
| while IFS=+ read -r hash time branch message; do \ | |
| timelength=$(echo \"$time\" | sed -r \"s:[^ ][[]([0-9]{1,2}(;[0-9]{1,2})?)?m::g\"); \ | |
| timelength=$(echo \"16+${#time}-${#timelength}\" | bc); \ | |
| printf \"%${timelength}s %s %s %s\n\" \"$time\" \"$hash\" \"$branch\" \"$message\"; \ | |
| done < <(git logx && echo);"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment