code: def branches(remotes=False):
      
      stdout = branch('--list %s' % (remotes and '-a' or ''), quiet=True)
      return [_.lstrip('*').strip() for _ in stdout.splitlines()]
docs: Return a list of all local branches in the repo
  
      If remotes is true then also include remote branches
  
      Note: the normal '*' indicator for current branch is removed
          this method just gives a list of branch names
      Use branch() method to determine the current branch