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:
7
bin/e
Executable file
7
bin/e
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$1" == "" ]; then
|
||||||
|
exec $EDITOR .
|
||||||
|
else
|
||||||
|
exec $EDITOR $1
|
||||||
|
fi
|
||||||
1
bin/subl
Symbolic link
1
bin/subl
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl
|
||||||
@@ -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"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
.vimrc.local
|
.svn
|
||||||
|
*~
|
||||||
|
*.swp
|
||||||
|
|||||||
2
zsh/functions/_h
Normal file
2
zsh/functions/_h
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#compdef h
|
||||||
|
_files -W ~ -/
|
||||||
1
zsh/functions/h
Normal file
1
zsh/functions/h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
cd ~/$1
|
||||||
Reference in New Issue
Block a user