From 565a77fa8cd53264b9a609fdfd49bf023432ac8f Mon Sep 17 00:00:00 2001 From: Bilal Hussain Date: Mon, 7 Nov 2011 20:30:51 +0000 Subject: [PATCH] git setting --- .ackrc | 1 + .bash_profile | 5 +++++ .gitconfig | 54 +++++++++++++++++++++++++++++++++++++++++------- .hgignore_global | 4 ++++ .hgrc | 20 ++++++++++++++++++ 5 files changed, 77 insertions(+), 7 deletions(-) mode change 100644 => 100755 .gitconfig create mode 100644 .hgignore_global create mode 100644 .hgrc diff --git a/.ackrc b/.ackrc index 571eeaf..a7a5539 100644 --- a/.ackrc +++ b/.ackrc @@ -2,6 +2,7 @@ --type-add=html=.html.erb,.html.haml --type-add=js=.js.erb --type-add=css=.sass,.less +--type-set=jasmin=.j --type-set=cucumber=.feature --type-set=music=.mp3,.m4a,.flac,.ac3,.ogg,.aiff,.m4b,.aac,.wav,.wmv,.ape,.mka --type-set=manga=.cbz,.cbr,.cba,cb7 diff --git a/.bash_profile b/.bash_profile index 71bedab..2362146 100755 --- a/.bash_profile +++ b/.bash_profile @@ -39,13 +39,18 @@ export LSCOLORS=ExFxCxDxbxegedabagacad # Path settings(bin before current $PATH to override default version) PATH=$HOME/bin:/usr/local/bin:$PATH PATH=$PATH:/usr/local/sbin:$HOME/bin/mplayer_osx +PATH=$PATH:$HOME/Library/Haskell/bin # Scripts [ -d ~/.pscripts/ ] && PATH=$PATH:~/.pscripts/ [ -d ~/.Utilities/ ] && for i in ~/.Utilities/*; do PATH=$PATH:$i; done PATH=$PATH:/Users/bilalh/Programming/Projects/Shell-Tunes/extra + +PATH=$PATH:$HOME/Programming/Java/android-sdk-mac_x86/platform-tools export PATH +export ANDROID_SDK=$HOME/Programming/Java/android-sdk-mac_x86 + ### aliases and other functions [ -f ~/.bashrc ] && source ~/.bashrc diff --git a/.gitconfig b/.gitconfig old mode 100644 new mode 100755 index 75ccf19..d04416c --- a/.gitconfig +++ b/.gitconfig @@ -6,18 +6,52 @@ [core] excludesfile = /Users/bilalh/.gitignore [alias] + b = branch - lg = log --graph --pretty=format:'%Cred%an%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --date=relative - ld = log --graph --pretty=format:'%Cred%an%Creset -%C(yellow)%d%Creset %s %Cgreen(%ai)%Creset' - pom = push origin master - w = whatchanged - p = push c = commit + d = describe + p = push + s = status + w = whatchanged ca = commit -am ch = checkout - s = status - d = describe + pom = push origin master ldiff = difftool -t latex + + # Logs + lg = log --graph --pretty=format:'%Cred%an%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --date=relative + ld = log --graph --pretty=format:'%Cred%an%Creset -%C(yellow)%d%Creset %s %Cgreen(%ai)%Creset' + + # One line per commit + lo = log --graph --decorate --pretty=oneline --abbrev-commit + loa = log --graph --decorate --pretty=oneline --abbrev-commit --all + + # commits not pushed to $1 + unpushed = cherry -v + + # what tag contains the sha + tag = name-rev --name-only + + # what branch contains the sha + contains = branch --contains + + # lost commits + lost = !"git fsck | awk '/dangling commit/ {print $3}' | git show --format='SHA1: %C(yellow)%h%Creset %f' --stdin | awk '/SHA1/ {sub(\"SHA1: \", \"\"); print}'" + + # show a list of branches sorted by time of last commit + brage = "!f() { git for-each-ref --sort=committerdate refs/heads $1 --format=\"%(refname:short)\" ; }; g() { for C in $(f $1) ; do git show -s --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset $C\" \"$C\" -- ; done; }; g " + + # show remote branches as well + brageall = !git brage refs/remotes + + # show a list of tags sorted by when they were tagged + tagage = "!sh -c 'git for-each-ref --sort=taggerdate refs/tags --format=\"%(refname:short)\"'" + + # show a list of every branch and show there latests commit, sorted by last commit + brlog = "!sh -c 'for C in $(git for-each-ref --sort=committerdate refs/heads --format=\"%(refname:short)\") ; do git show -s --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset $C\" \"$C\" -- ; git show -s $C ; echo; done'" + # url of origin, about 99% of what I use git config --list for + cloneurl = config --get remote.origin.url + [core] pager = less -FRSX quotepath = false @@ -31,3 +65,9 @@ prompt = false [diff] tool = Kaleidoscope +[difftool "sourcetree"] + cmd = /Applications/Kaleidoscope.app/Contents/MacOS/ksdiff -w \"$LOCAL\" \"$REMOTE\" + path = +[mergetool "sourcetree"] + cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" + trustExitCode = true diff --git a/.hgignore_global b/.hgignore_global new file mode 100644 index 0000000..187b396 --- /dev/null +++ b/.hgignore_global @@ -0,0 +1,4 @@ +syntax: glob + +*~ +.DS_Store diff --git a/.hgrc b/.hgrc new file mode 100644 index 0000000..267fa16 --- /dev/null +++ b/.hgrc @@ -0,0 +1,20 @@ +[ui] +username=Bilal Hussain + +ignore=/Users/bilalh/.hgignore_global +[web] +cacerts =/Users/bilalh/Uni/CS/its.crt +[merge-tools] +sourcetreemerge.gui=False +sourcetreebulkmerge.gui=False +sourcetreemerge.binary=False +sourcetreebulkmerge.executable=/Applications/SourceTree.app/Contents/Resources/hg-merge.sh +sourcetreemerge.args=$local $other -ancestor $base -merge $output +sourcetreemerge.checkconflicts=True +sourcetreemerge.premerge=True +sourcetreemerge.executable=/Applications/SourceTree.app/Contents/Resources/opendiff-w.sh +sourcetreebulkmerge.premerge=False +sourcetreebulkmerge.binary=True +[extdiff] +cmd.sourcetreediff=/Applications/Kaleidoscope.app/Contents/MacOS/ksdiff +opts.sourcetreediff=-w