How to Checkout OnnxRuntime for Building from Source on Windows

If I just download the zip from the Release page and then follow the build instructions, I get this error:

subprocess.CalledProcessError: Command ‘[‘git’, ‘submodule’, ‘sync’, ‘ — recursive’]’ returned non-zero exit status 128.

You can’t just build from the latest on master branch, you need to checkout a tag for a release and build from that. Master could have anything in it, and it is not guaranteed to work. This is not explicitly stated in their documentation.