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

Add --depth switch? #306

Open
almereyda opened this issue Dec 7, 2020 · 2 comments
Open

Add --depth switch? #306

almereyda opened this issue Dec 7, 2020 · 2 comments

Comments

@almereyda
Copy link

When cloning very large repositories only for testing their functionality, not all previous commits are needed. Therefore the amount of commits to be cloned can be limited with the --depth flag in git.

Implementing it (-d/--depth) and passing it on to git could greatly help to keep the file size of the projects low.

@yasuo-ozu
Copy link

today --shallow option is usable for this purpose.

@almereyda
Copy link
Author

Thank you for this information, it hadn't occured to me to consider a shallow clone. Also the readme warns about this, if one wanted to work with it (emphasis mine):

With '--shallow' option, a "shallow clone" will be performed (for Git repositories only, 'git clone --depth 1 …​' eg.). Be careful that a shallow-cloned repository cannot be pushed to remote. Currently Git and Mercurial repositories are supported.

@lorentzleutgeb May I ask what had once led to your 👎🏽 reaction on this post? I wasn't intending any harm here. 🤷🏽

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

2 participants