new commands, updated gitconfig

+ e opens $EDITOR (thanks @holman)
+ h is same as 'c' but in home directory (thanks @holman)
+ updated gitconfig
This commit is contained in:
Nick Nisi
2013-02-05 20:45:45 -06:00
parent fd79fe70c1
commit 99343b27a7
7 changed files with 26 additions and 22 deletions

7
bin/e Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
if [ "$1" == "" ]; then
exec $EDITOR .
else
exec $EDITOR $1
fi

1
bin/subl Symbolic link
View File

@@ -0,0 +1 @@
/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl

View File

@@ -14,7 +14,7 @@ alias grm='git rm'
alias grn='git-rename' alias grn='git-rename'
alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
alias git-amend='git commit --amend -C HEAD' # alias git-amend='git commit --amend -C HEAD'
alias git-undo='git reset --soft HEAD~1' alias git-undo='git reset --soft HEAD~1'
alias git-count='git shortlog -sn' alias git-count='git shortlog -sn'
alias git-undopush="git push -f origin HEAD^:master" alias git-undopush="git push -f origin HEAD^:master"

View File

@@ -38,7 +38,7 @@
count = shortlog -sn count = shortlog -sn
undo = reset --soft HEAD~1 undo = reset --soft HEAD~1
amend = git commit --amend -C HEAD amend = commit --amend -C HEAD
# grep commands # grep commands
@@ -58,26 +58,10 @@
diff = auto diff = auto
status = auto status = auto
branch = auto branch = auto
interactive = auto ui = true
ui = auto
[color "branch"]
current = green bold
local = green
remote = red bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = green bold
changed = yellow bold
untracked = red
[color "sh"]
branch = yellow
[push] [push]
# push will only do the current branch, not all branches # push to the upstream branch but only if it is the same name
default = current default = simple
[branch] [branch]
# set up 'git pull' to rebase instead of merge # set up 'git pull' to rebase instead of merge
autosetuprebase = always autosetuprebase = always
@@ -87,5 +71,12 @@
[core] [core]
excludesfile = ~/.gitignore_global excludesfile = ~/.gitignore_global
pager = less -FXRS -x2 pager = less -FXRS -x2
editor = vim
[apply]
# turn off trailing whitespace warning
whitespace = nowarn
[mergetool]
# remove backup files after a successful merge
keepBackup = false
[rerere] [rerere]
enabled = false enabled = false

View File

@@ -1,3 +1,5 @@
.DS_Store .DS_Store
Thumbs.db Thumbs.db
.vimrc.local .svn
*~
*.swp

2
zsh/functions/_h Normal file
View File

@@ -0,0 +1,2 @@
#compdef h
_files -W ~ -/

1
zsh/functions/h Normal file
View File

@@ -0,0 +1 @@
cd ~/$1