Nice nugget found in this Lobste.rs comment chain: cloning a single Git commit.
$ mkdir repo && cd repo
$ git init
$ git fetch --depth=1 REPO_URL COMMIT_ID
$ git reset --hard COMMIT_ID
Nice nugget found in this Lobste.rs comment chain: cloning a single Git commit.
$ mkdir repo && cd repo
$ git init
$ git fetch --depth=1 REPO_URL COMMIT_ID
$ git reset --hard COMMIT_ID