We, follow this guide Getting Started - QMK Firmware carefully. I am on macOS High Sierra, so these notes pertain only to that.
When you get to the part of the above guide where it is time to clone the qmk repo, I do the following:
I don’t want all the history of objects and logs in the repo or its submodules, so I clone shallow both the repo and its submodules: