organized gitconfig. no breaking changes, couple new aliases.

This commit is contained in:
Kyle West 2012-01-24 16:08:40 -05:00
parent 36d6fecb11
commit b2c25b860a

124
gitconfig
View File

@ -1,4 +1,5 @@
# set these tokens up in your env, such as ~/.secrets # set your user tokens as enivornment variables, such as ~/.secrets
# See the README for examples.
[color] [color]
ui = true ui = true
[color "branch"] [color "branch"]
@ -11,65 +12,83 @@
old = red bold old = red bold
new = green bold new = green bold
[alias] [alias]
d = diff # show unstaged changes # add
dc = diff --cached # show staged changes a = add # add
last = diff HEAD^ # show last committed change chunkyadd = add --patch # stage commits chunk by chunk
unstage = reset HEAD # remove files from index (tracking) addall = !sh -c 'git add . && git add -u' # TODO: what does this do?
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
chunkyadd = add --patch # stage commits chunk by chunk
filelog = log -u # show changes to a file
amend = commit --amend
ammend = commit --amend
mt = mergetool #fire up the merge tool
addall = !sh -c 'git add . && git add -u' # branch
b = branch -v # branch (verbose)
# rebasing # commit
rc = rebase --continue c = commit -m # commit with message
rs = rebase --skip ca = commit -am # commit all with message
ci = commit # commit
amend = commit --amend # ammend your last commit
ammend = commit --amend # ammend your last commit
# save some typing for common commands # checkout
ci = commit co = checkout # checkout
co = checkout nb = checkout -b # create and switch to a new branch (mnemonic: "git new branch branchname...")
b = branch -v
r = remote -v
t = tag -n
# create and switch to a new branch (mnemonic: "git new branch branchname...") # cherry-pick
nb = checkout -b cp = cherry-pick -x # grab a change from a branch
stat = status # diff
s = status d = diff # diff unstaged changes
dc = diff --cached # diff staged changes
last = diff HEAD^ # diff last committed change
# stashing # log
ss = stash log = log --decorate --graph --date=short
sl = stash list l = log
sa = stash apply
sd = stash drop
# grab a change from a branch
cp = cherry-pick -x
# move patch
# default logging
l = log --decorate --graph --date=short --pretty=\"format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(black) [%an]%Creset\"
# nice logs
changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status
short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\"
changelog = log --pretty=format:\" * %s\" changelog = log --pretty=format:\" * %s\"
shortnocolor = log --pretty=format:\"%h %cr %cn %s\" shortnocolor = log --pretty=format:\"%h %cr %cn %s\"
# pull
pl = pull # pull
# push
ps = push # push
# rebase
rc = rebase --continue # continue rebase
rs = rebase --skip # skip rebase
# remote
r = remote -v # show remotes (verbose)
# reset
unstage = reset HEAD # remove files from index (tracking)
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
filelog = log -u # show changes to a file
mt = mergetool # fire up the merge tool
# stash
ss = stash # stash changes
sl = stash list # list stashes
sa = stash apply # apply stash (restore changes)
sd = stash drop # drop stashes (destory changes)
# status
s = status # status
st = status # status
stat = status # status
# tag
t = tag -n # show tags with <n> lines of each tag message
# svn helpers # svn helpers
svnr = svn rebase svnr = svn rebase
svnd = svn dcommit svnd = svn dcommit
svnl = svn log --oneline --show-commit svnl = svn log --oneline --show-commit
drop = !sh -c 'git add . && git stash && git stash drop' drop = !sh -c 'git add . && git stash && git stash drop' # TODO: what does this do?
grab = !sh -c 'git-grab.sh' grab = !sh -c 'git-grab.sh' # TODO: what does this do?
[gc] [format]
# auto = 1 pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset
[merge] [merge]
summary = true summary = true
verbosity = 1 verbosity = 1
@ -80,20 +99,19 @@
[push] [push]
# 'git push' will push the current branch to its tracking branch # 'git push' will push the current branch to its tracking branch
# the usual default is to push all branches # the usual default is to push all branches
default = tracking default = tracking
[core] [core]
autocrlf = false autocrlf = false
editor = /usr/bin/vim editor = vim
excludesfile = ~/.dotfiles/gitignore_global excludesfile = ~/.dotfiles/gitignore_global
[advice] [advice]
statusHints = false statusHints = false
[diff] [diff]
# Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject # Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
# instead of a/b/c/d as prefixes for patches # instead of a/b/c/d as prefixes for patches
mnemonicprefix = true mnemonicprefix = true
[rerere] [rerere]
# Remember my merges # Remember my merges
# http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/ # http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/
enabled = true enabled = true