def parse_git_path(git_path):
    """ Returns tuple (repo_url, git_ref, code_path) """
    git_ref = 'master'
    repo_url, code_path = git_path.replace('git://', '').split('//')
    if '#' in repo_url:
        repo_url, git_ref = repo_url.split('#')
    repo_url = repo_url.rstrip('.git')
    if not code_path:
        code_path = '/'
    return repo_url, git_ref, code_path
