Clone a repository without getting the entire history
Git has a feature that we call Shallow Clone; this allows us to make a clone of a repository without taking in the entire history of commits/logs with it.
Subscribe to receive updates, tips and more handy tutorials.
Git has a feature that we call Shallow Clone; this allows us to make a clone of a repository without taking in the entire history of commits/logs with it.
I don't know about you, but this happens with me all the time, I accidentally take a pull in the wrong branch, then curse a bit, call my self some names 🤬, and then apply this fix, which is effortless if you understand the concept well enough.
There are times when our setup is gets messed up, or we mess it up in such a way that nothing seems to work; in those scenarios, use this command to discard anything you have done to start fresh.
When viewing the patch of a certain commit with git show <commit> you’re only interested in a certain part of it, related to a file or a directory.
If you have a windows setup, you must have faced the annoying issue of file name case change. Where you changed the file name capitalization but it just doesn't show up.