Skip to content

Git克隆大型仓库并在上面提交代码 #62

@varHarrie

Description

@varHarrie
# 克隆指定分支最新的单个commit
git clone REPO_URL --single-branch --branch BRANCH_NAME --depth=1

# 设置分支的remote(所有)
git remote set-branches origin '*'
# 设置分支的remote(单个)
git remote set-branches origin 'BRANCH_NAME'

# 拉取指定分支的最新commit
git fetch --depth 1 origin BRANCH_NAME
git checkout BRANCH_NAME

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions