Created
March 10, 2011 18:43
-
-
Save jfexyz/864627 to your computer and use it in GitHub Desktop.
Git Config: Rename this file ".gitconfig" and place inside your home directory.
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
## | |
# This file should be renamed ".gitconfig" and placed inside your home directory. | |
## | |
[user] | |
name = YOUR_NAME | |
email = YOUR_EMAIL | |
[github] | |
user = YOUR_GITHUB_USERNAME | |
token = YOUR_GITHUB_TOKEN | |
[core] | |
pager = less -FRSXE | |
excludesfile = ~/.gitignore_global | |
[alias] | |
br = branch | |
ci = commit | |
cia = commit -a | |
co = checkout | |
cp = cherry-pick | |
df = diff | |
st = status | |
sth = stash | |
up = pull origin | |
who = shortlog -s -- | |
spull = !git-svn rebase | |
spush = !git-svn dcommit | |
sub = submodule | |
ddiff = !git-diff --no-prefix | |
## `git last 2 name` displays last two days of commits by name on all local and remote branches | |
## "name" can be a partial match, or left off to display your own commits | |
last = "!fn() { S=1; A=`git config --get user.name`; if [ -n \"$1\" ]; then S=\"$1\"; shift; fi; if [ -n \"$1\" ];then if [ \"$1\" != \"me\" ]; then A=\"$1\"; fi; shift; fi; git log -i --since=\"$S days ago\" --author=\"$A\" --branches --remotes --format='%C(yellow)%t%Creset %s (%an)' \"$@\"; }; fn" | |
lastbydate = "!fn() { S=1; A=`git config --get user.name`; if [ -n \"$1\" ]; then S=\"$1\"; shift; fi; if [ -n \"$1\" ];then if [ \"$1\" != \"me\" ]; then A=\"$1\"; fi; shift; fi; git log -i --since=\"$S days ago\" --author=\"$A\" --branches --remotes --date-order --reverse --format='%ai %s' \"$@\"; }; fn" | |
[color] | |
ui = auto | |
branch = auto | |
diff = auto | |
status = auto | |
# [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 | |
[branch] | |
autosetupmerge = true | |
[push] | |
default = tracking | |
[remote "origin"] | |
push = HEAD | |
#[gui] | |
# fontdiff = -family Consolas -size 12 -weight normal -slant roman -underline 0 -overstrike 0 | |
[merge] | |
tool = diffmerge | |
[mergetool] | |
prompt = false | |
keepBackup = false | |
[mergetool "chdiff"] | |
cmd = /usr/bin/env chdiff --wait "$LOCAL" "$REMOTE" | |
trustExitCode = false | |
[mergetool "diffmerge"] | |
cmd = /usr/bin/env diffmerge --merge --result="$MERGED" "$LOCAL" "$BASE" "$REMOTE" | |
trustExitCode = false | |
[diff] | |
tool = diffmerge | |
[difftool] | |
prompt = false | |
[difftool "chdiff"] | |
cmd = /usr/bin/env chdiff "$LOCAL" "$REMOTE" | |
[difftool "diffmerge"] | |
cmd = /usr/bin/env diffmerge "$LOCAL" "$REMOTE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment