Comparing to what I have in bloom, there is an additional check for `(no branch)`:

```python
def get_branches(local_only=False, directory=None):
    cmd = 'git branch --no-color'
    if not local_only:
        cmd += ' -a'
    out = check_output(cmd, shell=True, cwd=directory)
    branches = []
    for line in out.splitlines():
        if line.count('HEAD -> ') > 0:
            continue
        if line.count('(no branch)') > 0:
            continue
        line = line.strip('*').strip()
        branches.append(line)
    return branches
```

It also does the `* ` stripping slight different.

Not sure we should change this pull request to mimic bloom's version or not.