Hi there, Its Naman. I am sure that if you work with Git then you must have stumble across one of these situations at least once:
- You need only one subfolder but don't want to clone the entire repo
- You only need to play around the code and you don't care about the whole Git history.
For the first problem, there is no straightforward way/command available (Correct me if I am wrong). If the repo is small then you can clone the whole repo. Easy peasy, you won't think twice but if the repo is huge then you might think twice or maybe thrice. 😛
For the second problem, if you don't care about the code history then cloning history is overhead for you. We should skip if we can (A native way available but isn't friendly).
Note: Before moving forward make sure you have Node.js installed in your system. I recommend installing Node.js via nvm(Node Version Manager)
sudo npm i -g degit if your terminal shows permission error.
I ❤️ this. It's super fast. 🚀
That's it for today. Feel free to provide any type of feedback. I highly appreciate that. Meanwhile, you can find me on Twitter @InsaneNaman.
Signing off. See you soon.