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

Question: How is that different from using "--depth 1" #7

Closed
KhaledElAnsari opened this issue Jul 31, 2017 · 4 comments
Closed

Question: How is that different from using "--depth 1" #7

KhaledElAnsari opened this issue Jul 31, 2017 · 4 comments

Comments

@KhaledElAnsari
Copy link

Hey, thank you for your work but I want to ask what is the difference between your project and using git clone --depth 1 which will cause getting only the last commit

And for the branches I believe git has a solution for that too using git clone -b <branch> <remote_repo>

@KhaledElAnsari KhaledElAnsari changed the title Question: How is that different from using --depth 1 Question: How is that different from using "--depth 1" Jul 31, 2017
@Rich-Harris
Copy link
Owner

A few differences:

  • If you git clone, you get a .git folder that pertains to the project template, rather than your project. You can easily forget to re-init the repository, and end up confusing yourself
  • Caching (if you already have a .tar.gz file for a specific commit, you don't need to fetch it again)
  • Less to type (degit user/repo instead of git clone --depth 1 git@github.com:user/repo)
  • Future capabilities — interactive mode, friendly onboarding and postinstall scripts

@Rich-Harris
Copy link
Owner

Oh, and a corollary to the caching thing — it could work offline, if we stored some extra metadata. Useful if you need to work on the train etc

@KhaledElAnsari
Copy link
Author

Aha I see, thanks @Rich-Harris

@V-kremenlieva
Copy link

A few differences:

  • If you git clone, you get a .git folder that pertains to the project template, rather than your project. You can easily forget to re-init the repository, and end up confusing yourself
  • Caching (if you already have a .tar.gz file for a specific commit, you don't need to fetch it again)
  • Less to type (degit user/repo instead of git clone --depth 1 git@github.com:user/repo)
  • Future capabilities — interactive mode, friendly onboarding and postinstall scripts

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

3 participants