diff --git a/README.md b/README.md index 90a573f6..587ba9f6 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,20 @@ To work in GitHub, go to https://github.com/microsoft/sql-server-samples and for Each sample should be in its own folder with a README.md file that follows the [template](README_samples_template.md). Generated files (e.g., .exe or .bacpac) and user configuration settings (e.g., .user) should not be committed to GitHub. +## Cloning only a subset of the repo (with sparse checkout) +You can follow the steps below to clone individual files from the sql-server-samples git repo. + +Note: The folowing script clones only the files under the *features* and *demos* folders. + +git clone -n https://github.com/Microsoft/sql-server-samples.\sql-server-samples +cd sql-server-samples +git config core.sparsecheckout true +echo samples/features/*| out-file -append -encoding ascii.git/info/sparse-checkout +echo samples/demos/*| out-file -append -encoding ascii.git/info/sparse-checkout +git checkout + +For more information about sparse checkout please visit [this] https://stackoverflow.com/questions/23289006/on-windows-git-error-sparse-checkout-leaves-no-entry-on-the-working-directory stackoverflow thread. + ## Code of Conduct This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.