Chapter 3 Cloning and maintaining the
Don't know what this means? That's ok! A GitHub repository (or “repo”) is basically a collection of files hosted on GitHub, and what you need to know for now is that you're essentially copying onto your local computer a GitHub repo in a way that will allow you to later easily update the files on your local machine in accordance with their updates in the corresponding GitHub repo. Some of these files you don't “need” (e.g., the library of examples), but some you do (e.g., the files
mathbook-latex.xsl), and you will need to update these from GitHub from time to time, so you should follow these instructions exactly.
In your Git Bash shell, first enter the command
cd(this will take you to your default directory).
Next, enter in the following commands, pressing enter after each command:
git clone https://github.com/rbeezer/mathbook.git cd mathbook git checkout dev
This will install a folder called
mathbookin your on your local machine that contains the necessary (and optional) files. Do not move this folder or its contents. If you install this folder somewhere else, or move it, you will need to make adjustments to later commands described in this tutorial.
mathbookrepository on your local machine up to date
Whenever the developers make changes to the files in the GitHub repository
mathbook, you can update these files accordingly on your local machine by navigating in the Git Bash shell to the
mathbookfolder and entering the command
You should pull from this repo daily, or at least whenever you plan to compile, since it is very regularly updated.
Important note: When you
git pullto update your
mathbookfolder, you should be in the
master, branch.If your Git Bash prompt ends in
mathbook (dev), you're in the correct branch. If it ends in
mathbook (master), enter in
git checkout devto move to the correct
devbranch before entering