Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 20th, 2012  |  syntax: None  |  size: 0.75 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Prompt (Debian)
  2.  
  3. source /usr/local/bin/git-completion.sh
  4.  
  5. # Prompt (OS X + homebrew)
  6.  
  7. source /usr/local/etc/bash_completion.d/git-completion.bash
  8. PS1="\[\033[31;38m\]\w\[\033[1;31m\]\$(__git_ps1)\[\033[00m\] "
  9. export GIT_PS1_SHOWDIRTYSTATE=1
  10.  
  11. # Editor
  12. export GIT_EDITOR='nano -Y patch'
  13.  
  14. # Shortcuts
  15.  
  16. # Creates git repostitory with some reasonable default settings in current folder
  17. function git_here() {
  18.         git init
  19.         git config color.ui auto
  20.         echo "log tmp db/*.sqlite3 nbproject/private bin .DS_Store" | tr " " "\n" > .gitignore
  21.         git add .gitignore
  22.         git commit -m "initial project setup"
  23. }
  24.  
  25. alias d='git diff --word-diff $@'
  26. alias s='d;git status -sb'
  27. alias b='git branch -avv'
  28. alias a='git add $@'
  29. alias c='git commit -v $@'
  30. alias ac='git add .;c $@'
  31. alias lg='git lg'