Maybe a small comment in the code could be in place to avoid future 
confusion. :)

On 11/15/13 11:33 AM, Guillermo Carrasco wrote:
>
> In scripts/backup_github.py:
>
> > +import argparse
> > +import os
> > +import sys
> > +import logbook
> > +
> > +from subprocess import check_call
> > +from subprocess import CalledProcessError
> > +
> > +import pygithub3
> > +
> > +LOG = logbook.Logger('GitHub Backup')
> > +
> > +
> > +track_all_branches = """
> > +for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
> > +    git branch --track ${branch##*/} $branch
>
> Sure :-). An example will explain better:
>
> |guillem@guillemmac:~/repos/scilifelab/scripts (github)$ for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do echo ${branh}; echo ${branch##*/}; done
> remotes/origin/develop
> develop
> remotes/origin/feature/pm
> pm
> remotes/origin/gh-pages
> gh-pages
> remotes/origin/github
> github
> remotes/origin/logstash
> logstash
> |
>
> The thing is that to track the branch I need only the name of the 
> branch, not the whole name with the remote included.
>
> If you're more curious, check it out here 
> <http://tldp.org/LDP/abs/html/string-manipulation.html>
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/SciLifeLab/scilifelab/pull/331/files#r7686627>.
>