public
Last active — forked from henrik/.bashrc

My user setup

  • Download Gist
.gitconfig
INI
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
[alias]
st = status -s
aa = add --all
ci = commit -m
co = checkout
cob = checkout -b
merf = merge --no-ff
br = branch
sub = submodule add
subup = submodule update --init
cl = clone --recursive
undo = reset --hard
df = diff
dft = difftool
lg = log -p
lol = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
;from http://git-wt-commit.rubyforge.org
[core]
quotepath = false
[color]
diff = auto
status = auto
branch = auto
[difftool "Kaleidoscope"]
cmd = ksdiff-wrapper git \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[diff]
tool = Kaleidoscope
.profile
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
alias wget='curl -O $1'
 
alias cleansvn='find . -name ".svn" -type d -exec rm -rf {} \;'
alias cleanhg='find . -name "*.orig" -exec rm -rf {} \;'
alias cleanwin='find . -type f -name "*.lnk" -delete; find . -type f -name "Thumbs.db" -delete; find . -type f -name "thumbs.db" -delete;'
alias cleanosx='find . -name ".DS_Store" -type f -exec rm -rf {} \;'
 
#open all files with a given extension under the current directory
openfiles () { find . -name "*.$1" -type f | xargs open; }
 
#find files with the given extension that contain the search string
findinfiles () { grep -r --include "*.$1" "$2" --ignore-case .; }
 
#open files that the string was found in
openfindinfiles () { grep -r --include "*.$1" "$2" --ignore-case --files-with-matches . | xargs open; }
 
#git svn commands make pushing and pulling easier
gitsvnpull () { git svn fetch; }
gitsvnpush () { git svn rebase; git svn dcommit; }
 
# Inspired by: http://henrik.nyh.se/2008/12/git-dirty-prompt
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/($(parse_git_dirty)\1)/"
}
 
# username@Machine[dir](master)$ # clean working directory
# username@Machine[dir](*master)$ # dirty working directory
export PS1='\u@\h[$(basename "${PWD}")]$(parse_git_branch)\$ '

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.