1
0

curgitb 245 B

1234567
  1. #!/bin/bash
  2. current_branch=`git branch 2>&1`
  3. if [ "$current_branch" != 'fatal: not a git repository (or any of the parent directories): .git' ]
  4. then
  5. current_branch=`echo "$current_branch" | grep \* | cut -d ' ' -f2`
  6. echo "($current_branch)"
  7. fi