title: Using Git to select a subset of files
body: <h2>Introduction</h2>
  <p>So I'm building a course that is comprised of a textbook (a set of Markdown files), some sample code (for homeworks and projects) and slides (right now in Google Slides).</p>
  <p>The Textbook is published using a Markdown publishing tool called GitBook, which allows me to use GitHub to host all of the markdown files and automatically compiles them into a nice styled web UI for reading. It also allows for translated versions of the book to be included in a specific way so that it can be read in multiple languages.</p>
  <p>Currently the book is hosted in two separate Github repositories, one for the concepts (or lectures) and one for the practicals (lab exercises).</p>
  <p>The code is also stored in two Github repositories: solution code and starter apps.</p>
  <p>The slides are currently all up on Google Slides.</p>
  <h2>Problem</h2>
  <p>I'm looking to organize (or reorganize) this course with the following in mind:</p>
  <ol>
  <li><p>The course needs to be modular. It will be taught in many different  environments, with some being very thorough, and some being quite short. This means that I would like to somehow tag different parts of the course so that I could pull together different versions of the course (perhaps a three day version would include only the fundamentals, but a week long seminar could include extra modules). Ideally, I could use the same markers for the textbook, the code and the slides, so I could automatically pull together the correct &quot;package&quot;.</p>
  </li>
  <li><p>The GitBook requires a specific file structure in the repository, so I can't change too much around there.</p>
  </li>
  <li><p>The slides are currently not even in a repository, since they are in a Google Slide format, but it would be pretty amazing to move them over as wells o everything could be in one place (maybe some sort of Markdown as well? Would have to convert it though).</p>
  </li>
  </ol>
  <h2>What I Have Tried</h2>
  <p>I'm not really sure where to start with organizing all this content, I was thinking about moving everything into one repository, and using submodules to keep things organized, but I don't have much experience with this.</p>
  <p>Also thought about using different branches for the different versions, but it seems like that would add a ton of work because I have to independently update each branch when there is a change if there are files in common.</p>
  <p>Tags also came to mind, but as those are for commits and not files, not sure how that would help.</p>
  <p>Any suggestions? Tools? Ideas?</p>
  <p>Thanks in advance,
  Nikita</p>