Skip to content

Instantly share code, notes, and snippets.

@isrmicha
Created November 8, 2017 12:50
Show Gist options
  • Save isrmicha/2e9f015a9b66f2062c0e7e13a78c7318 to your computer and use it in GitHub Desktop.
Save isrmicha/2e9f015a9b66f2062c0e7e13a78c7318 to your computer and use it in GitHub Desktop.
# clone only the remote primary HEAD (default: origin/master)
git clone --single-branch
as in:
git clone <url> --branch <branch> --single-branch [<folder>]
You can see it in t5500-fetch-pack.sh:
test_expect_success 'single branch clone' '
git clone --single-branch "file://$(pwd)/." singlebranch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment