Skip to content

Instantly share code, notes, and snippets.

@inamiy
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inamiy/9067722 to your computer and use it in GitHub Desktop.
Save inamiy/9067722 to your computer and use it in GitHub Desktop.
[user]
name = Yasuhiro Inami
email = inamiy@gmail.com
[color]
ui = auto
[core]
autocrlf = false
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
editor = /usr/bin/vim
[alias]
info = remote show origin
export = checkout-index -a -f --prefix=../export/
st = status
ci = commit
ca = commit --amend
co = checkout
cr = clone --recursive
#dc = diff between index & repos
dc = diff --cached
#rc = remove index only (git rm for file & index)
rc = rm --cached
#reset
rh = reset HEAD
rh1 = reset HEAD~
rhh = reset --hard HEAD
rhh1 = reset --hard HEAD~
#fetch
f = fetch -p origin
#fetch pull-request
fp = fetch origin +refs/pull/*/head:refs/remotes/origin/pr/*
#log
log1 = log --oneline --decorate --graph
l1 = log --oneline --decorate --graph -n 10
log2 = log --graph --decorate --pretty=format:\"%ad [%cn] %h> %n %Cgreen%d%Creset %s %n\" --name-status
logst = log --stat --graph
ls = ls-files
b = branch
r = remote
rp = remote prune origin
sub = submodule
subst = submodule status
subup = submodule update --init --recursive
subpull = submodule foreach git pull
subrm = "!f(){ git rm --cached \"$1\";rm -r \"$1\";git config -f .gitmodules --remove-section \"submodule.$1\";git config -f .git/config --remove-section \"submodule.$1\";git add .gitmodules; }; f"
zip = archive --format=zip
fixup = commit --amend -C HEAD
[push]
default = tracking
[http]
sslVerify = false
[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
[credential]
helper = osxkeychain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment