a bit a git
Posted by ark, ,
I'm in branch 'ng' and I  then branch that for my new feature ng-wizzles
so I can then do pull requests into the ng branch when I'm done.
but now someone's been checking in awesome in to ng so I want that in my ng-wizzles branch

git checkout ng
git pull origin ng
git checkout ng-wizzles
git merge ng

install git bash completion stuff.

function sourceIfExists {
  if [ -r "$1" ]; then
    source "$1"
export -f sourceIfExists

sourceIfExists /usr/local/etc/bash_completion.d/git-completion.bash

if [ -r "$GIT_PROMPT" ]; then
  export GIT_BRANCH=' $(__git_ps1 "(%s)")'
  export GIT_BRANCH=''

function branch {
  __git_ps1 "%s"
export -f branch

use GIT_BRANCH in your PS1
and use $(branch) when you want the current branch in a command shell