Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idiomatic way of specifying --single-branch argument #285

Open
am11 opened this issue Jun 20, 2020 · 4 comments
Open

Idiomatic way of specifying --single-branch argument #285

am11 opened this issue Jun 20, 2020 · 4 comments

Comments

@am11
Copy link

am11 commented Jun 20, 2020

Hello, AFAIK, the fastest way to clone just a single branch of a huge repository requires the following arguments:

git clone $REPO_URL   \
  --branch $BRANCH    \
  --depth 1           \
  --single-branch

With with: fetch-depth: 1, we get --depth 1, but I could not find a way to specify the last argument --single-branch, which skips fetching details of all branches except for the one specified by --branch (or default branch, if --branch or -b was skipped). Without --single-branch, it means "get depth 1 of all branches", and in case there are many (100+) branches, it is a sheer waste of time and resource for those who are interested in just one branch during the build (i.e. a common use-case).

Is there an idiomatic way to specify it? If not, please consider it for the future version.

Cheers!

@eechau
Copy link

eechau commented Nov 15, 2022

Hey guys, any updates so far? Looks like this still not implemented.

@marcospgp
Copy link

Also looking for something like this. Could not reproduce using git commands after running actions/checkout

@Stamo-Gochev
Copy link

Is there any update on this? Or at least - can you provide an approach that does something similar to what is required?

@fzinzun
Copy link

fzinzun commented Mar 20, 2024

Is there any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants