How do I add libraries to my git repository but not track them?
I am using the DataTables jquery plugin in a project. I cloned the project into my libs/ folder and added it to my .gitignore file like this:
- git repository export and import to zip file or folder
- git checkout --ours does not remove files from unmerged files list
- File will not sync after committing in GitHub Windows client?
- How to connect aptana to local GIT repository
- Setting up git after fresh install
- Git merge with cloned projects (best practice)
When I cloned my own repo on another computer I didn’t get the DataTables files. I guess this is because I was ignoring the directory. I need the files in DataTables for my project but did not want to track them since I had no need to modify them and they are part of their own repoo.
How can I make sure that when I clone my repo I get the DataTables files but still don’t track them?
One Solution collect form web for “How do I add libraries to my git repository but not track them?”
It sounds like you want to use submodules.
git submodule add https://github.com/DataTables/DataTables.git