This repository has been archived by the owner on Nov 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Sample git config
mjgiarlo edited this page Apr 12, 2013
·
5 revisions
[user]
name = Michael J. Giarlo
email = [email protected]
[github]
user = mjgiarlo
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = 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
[core]
excludesfile = .gitignore
pager = less -FRX
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
[alias]
co = checkout
type = cat-file -t
dump = cat-file -p
remotes = remote -v
branches = branch -avv
tags = tag -ln
hist = log --pretty=format:"%C(yellow)%h\\ %Cgreen%ad\\%Cblue\\ %an%Cred%d\\ %Creset%s" --graph --decorate --date=short
fdeltas = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
# Short form of status
stat = status -s
# Diff using word-diff algo
diff = diff --word-diff
# Search repo for a string
grep = grep -Ii
# File log
filelog = log -u
# Show modified files in last commit
lastdeltas = "!git fdeltas -1"
# Show a diff of the last commit
difflast = diff --cached HEAD^
# Diff a given commit ref
diffrev = "!f() { git diff "$1"^.."$1"; }; f"
# Show changed files since given commit ref
fdeltasrev = "!f() { git fdeltas "$1"^.."$1"; }; f"
# Find a file path in the repo
find = "!git ls-files | grep -i"
# List all git aliases
aliases = "!git config -l | grep alias | cut -c 7-"
# Show the last tag
lasttag = describe --tags --abbrev=0
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "develop"]
remote = origin
merge = refs/heads/develop