fabfile/utils.py
def checkout(remote, local):
    """
    Clone a remote repository `remote` to `local` and checkout origin/master.

    If the `remote` argument contains an optional extension `#revision`,
    then the specified revision will be checked out instead.
    """
    path, revision = (remote.split('#', 1) + [None])[:2]
    if not exists(local):
        git('clone {} {}'.format(path, local))
    with cd(local):
        rev = revision if revision else 'origin/master'
        git('fetch origin')
        git('checkout --force {}'.format(rev))
        git('reset --hard {}'.format(rev))  # --mixed?
        git('clean -fdx')

    Clone a remote repository `remote` to `local` and checkout origin/master.

    If the `remote` argument contains an optional extension `#revision`,
    then the specified revision will be checked out instead.
    
Clone a remote repository `remote` to `local` and checkout origin/master.
If the `remote` argument contains an optional extension `#revision`,
then the specified revision will be checked out instead.
Clone a remote repository ` remote ` to ` local ` and checkout origin / master . If the ` remote ` argument contains an optional extension ` #revision ` then the specified revision will be checked out instead .
def checkout(remote, local):
    path, revision = (remote.split('#', 1) + [None])[:2]
    if not exists(local):
        git('clone {} {}'.format(path, local))
    with cd(local):
        rev = revision if revision else 'origin/master'
        git('fetch origin')
        git('checkout --force {}'.format(rev))
        git('reset --hard {}'.format(rev))  
        git('clean -fdx')
def checkout ( remote , local ) : path , revision = ( remote . split ( '#' , 1 ) + [ None ] ) [ : 2 ] if not exists ( local ) : git ( 'clone {} {}' . format ( path , local ) ) with cd ( local ) : rev = revision if revision else 'origin/master' git ( 'fetch origin' ) git ( 'checkout --force {}' . format ( rev ) ) git ( 'reset --hard {}' . format ( rev ) ) git ( 'clean -fdx' )
Clone a remote repository `remote` to `local` and checkout origin/master.
Clone a remote repository ` remote ` to ` local ` and checkout origin / master .
"""
    Clone a remote repository `remote` to `local` and checkout origin/master.

    If the `remote` argument contains an optional extension `#revision`,
    then the specified revision will be checked out instead.
    """ # --mixed?
remote
local