Skip to content

Instantly share code, notes, and snippets.

@BananaHemic
Created July 31, 2017 03:04
Show Gist options
  • Save BananaHemic/615140684e9b4f931935bae9ad6c3fc9 to your computer and use it in GitHub Desktop.
Save BananaHemic/615140684e9b4f931935bae9ad6c3fc9 to your computer and use it in GitHub Desktop.
To add as a Submodule in your git project
Open powershell in the "Assets" directory of your Unity project
Run git submodule add https://github.com/....
cd to the folder you cloned
Run git config core.sparseCheckout true
Open the file "..\..\.git\modules\...\info\sparse-checkout", perferably in vim
Add "Unity/Assets" to the file (or whatever you want to KEEP)
Make sure the file endings are Unix (in vim, you can run set ff=unix)
Save/close your text editor and run git checkout master
Remember that unity adds a ton of meta files, which will stop some directories from being removed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment