Section G.3 Installing git¶
In this section we install the
git version control system and some tools to interact with it, including a fairly full-featured emulation of the
bash command line shell. I strongly recommend you use the Git Bash shell or another
bash emulation, so that you can use Linux commands referenced elsewhere.
One feature in particular,
pdfcrop, has not been made to work in the normal Windows
cmd shell, although the rest of PreTeXt has. To generate images using the
mbx script Section 8.9, you will need the Git Bash shell or something like it.
Subsection G.3.1 Steps to install git¶
Subsection G.3.2 Changing the path with .bashrc¶
In Subsection G.2.2, we promised that you could avoid messing with the Windows environment variables. If you install something else later that wants to use
xsltproc, then this might not be the best idea. But if you are only going to use it from within Git Bash, then this will work fine.
From the Git Bash command prompt, enter this line of text and hit Enter. Do not make any typos. You should substitute your value of
<xsltproc> where indicated, but make sure to conform to the conventions at the end of Subsection G.1.3 regarding Windows path names in Git Bash. (I warned you this was going to be annoying.)
echo "export PATH=<xsltproc>:$PATH" >> ~/.bashrc
You may get a message from Git Bash the next time you run it about
.bash_profile, which you may safely ignore.
Congratulations, you have successfully installed