From 9b316b60226f0aad9ca6e3fabfe06646df0d3d2a Mon Sep 17 00:00:00 2001 From: yan Date: Tue, 22 Nov 2011 13:30:09 -0600 Subject: [PATCH] Moved private info into env variables, cleanup --- gitconfig | 125 ++++++++++++++++++++++++++---------------------------- 1 file changed, 60 insertions(+), 65 deletions(-) diff --git a/gitconfig b/gitconfig index feb30ce..65c0af0 100644 --- a/gitconfig +++ b/gitconfig @@ -1,3 +1,10 @@ +# set these tokens up in your env, such as ~/.secrets +[github] + user = $GITHUB_USER + token = $GITHUB_TOKEN +[user] + name = $GIT_USER + email = $GIT_EMAIL [color] ui = true [color "branch"] @@ -10,98 +17,86 @@ old = red bold new = green bold [alias] - d = diff # show unstaged changes - dc = diff --cached # show staged changes + d = diff # show unstaged changes + dc = diff --cached # show staged changes last = diff HEAD^ # show last committed change - unstage = reset HEAD # remove files from index (tracking) - 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 - + unstage = reset HEAD # remove files from index (tracking) + 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' - # rebasing - rc = rebase --continue - rs = rebase --skip - - # save some typing for common commands - ci = commit - co = checkout - b = branch -v - r = remote -v - t = tag -n - - # create and switch to a new branch (mnemonic: "git new branch branchname...") - nb = checkout -b + # rebasing + rc = rebase --continue + rs = rebase --skip - stat = status - s = status - - # stashing - ss = stash - sl = stash list - sa = stash apply - sd = stash drop + # save some typing for common commands + ci = commit + co = checkout + b = branch -v + r = remote -v + t = tag -n - # grab a change from a branch - cp = cherry-pick -x + # create and switch to a new branch (mnemonic: "git new branch branchname...") + nb = checkout -b - # move patch + stat = status + s = status - # nice logs - changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status - short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" - changelog = log --pretty=format:\" * %s\" - shortnocolor = log --pretty=format:\"%h %cr %cn %s\" - - # svn helpers - svnr = svn rebase - svnd = svn dcommit - svnl = svn log --oneline --show-commit + # stashing + ss = stash + sl = stash list + sa = stash apply + sd = stash drop + + # grab a change from a branch + cp = cherry-pick -x + + # move patch + + # nice logs + changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status + short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" + changelog = log --pretty=format:\" * %s\" + shortnocolor = log --pretty=format:\"%h %cr %cn %s\" + + # svn helpers + svnr = svn rebase + svnd = svn dcommit + svnl = svn log --oneline --show-commit drop = !sh -c 'git add . && git stash && git stash drop' grab = !sh -c 'git-grab.sh' [gc] # auto = 1 [merge] - summary = true - verbosity = 1 + summary = true + verbosity = 1 [apply] - whitespace = nowarn + whitespace = nowarn [branch] autosetupmerge = true [push] # 'git push' will push the current branch to its tracking branch # the usual default is to push all branches - default = tracking + default = tracking [core] - autocrlf = false + autocrlf = false editor = /usr/bin/vim - excludesfile = ~/.dotfiles/gitignore_global + excludesfile = ~/.dotfiles/gitignore_global -[merge] - tool = threesome - -[mergetool "threesome"] - cmd = "mvim -f $BASE $LOCAL $REMOTE $MERGED -c 'ThreesomeInit'" - trustExitCode = true -[difftool "sourcetree"] - cmd = opendiff \"$LOCAL\" \"$REMOTE\" - path = -[mergetool "sourcetree"] - cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" - trustExitCode = true [advice] - statusHints = false + statusHints = false [diff] # Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject # instead of a/b/c/d as prefixes for patches - mnemonicprefix = true + mnemonicprefix = true [rerere] # Remember my merges # http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/ - enabled = true + enabled = true