@task
def feature(ctx, name, finish=False, push=False):
 print 'Renaming branch...'
 ctx.run('git branch -m feature/{}'.format(name), echo=True)
 if finish:
  ctx.run('git flow feature finish {}'.format(name), echo=True)
 if push:
  ctx.run('git push origin develop', echo=True)

@ task def feature ( ctx , name , finish = False , push = False ) : print 'Renaming branch...' ctx . run ( 'git branch -m feature/{}' . format ( name ) , echo = True ) if finish : ctx . run ( 'git flow feature finish {}' . format ( name ) , echo = True ) if push : ctx . run ( 'git push origin develop' , echo = True )
rename the current branch to a feature branch and optionally finish it .