def _gitTag(version, branch='develop'):
    with hide('running', 'stdout', 'stderr'):
        remotes = local('git remote', capture=True).split()
        if len(remotes) == 0:
            abort('You have no configured git remotes.')

    remote = ('origin' if 'origin' in remotes else
              'ooici' if 'ooici' in remotes else
              'ooici-eoi' if 'ooici-eoi' in remotes else
              remotes[0])
    if not remote in remotes:
        abort('"%s" is not a configured remote.' % (remote))

    versionTag = versionTemplates['git-tag'] % version
    versionMsg = versionTemplates['git-message'] % version

    comment = prompt('Optional comment for this release:', default='')
    if comment != '':
        versionMsg += ': ' + comment
    local('git commit -am "%s"' % (versionMsg))
    commit = local('git rev-parse --short HEAD', capture=True)
    local('git tag -af %s -m "%s" %s' % (versionTag, versionMsg, commit))

    print versionTag, versionMsg, commit

    return remote
dataset/ETHPy150Open ooici/pyon/fabfile.py/_gitTag/original