Skip to main content

Preface Materials: Mac

As this book was written on the assumption that you have no experience with Git or the command line, it also assumes you do not have necessary materials (software). Downloads will differ slightly depending on if you have a Mac or a PC and if you are running Linux. The following will provide necessary materials to use this book as well as links and some relevant instructions for those who are using a Mac with macOS.

A Text Editor.

In order to edit files as demonstrated in this book, you will need a text editor outside of the basic default editor. Any editor will work such as Sublime Text 11 .
If you are already familiar with an editor or if you like a particular one, use it! However, I personally prefer Visual Studio (VS) Code 12  which can be downloaded at the previous link. Throughout this book, I will refer to VS Code with some guidelines on how to find certain features. Should you decide to use another editor, it is up to you to learn how to use it. If you are a beginner with Git and the command line, I would stick with VS Code although as you gain experience you might think about switching to Sublime Text.

Git.

To use Git, you need to download and install it on your computer. You already have a command line, you just need to make sure that you have Git. Depending on your computer and where you got it, you may actually already have Git (for instance, university laptops). First, run a check to see if it is already installed. Don’t worry about how or why these steps work, all will be explained later on.
  1. Press Command + Space to open Spotlight Search.
  2. Start typing terminal.app. When the correct application pops up, click on it.
  3. Your terminal will appear. Don’t be scared of it! Type git --version and press Enter.
  4. If it spits out something like git version 2.41.0 (the numbers could be different), you’re good! If not, carry on.
Even if you do not know what Homebrew is, it recommend using it to install Git. It can also be used to quickly (i.e. in one line) install other pieces of software. You might find Homebrew useful in the future, even if it can be confusing to install at present:
  1. To install Homebrew, visit the Homebrew homepage 13  and navigate to the “Install Homebrew” heading (see Figure 0.0.0.0.1). Copy the long command there and paste it into your terminal (that you used earlier).
    The Homebrew Homepage, with the Install Homebrew heading (and command to paste into terminal) pictured.
    Figure 0.0.0.0.1. The Homebrew Homepage, brew.sh 14 
    Once you paste in that command, press Enter and follow the instructions on installation. Don’t worry about what each part does (to be honest, I’m not entirely sure either). It is safe and trustworthy (I did it on my computer).
  2. Now, use Homebrew to install Git. Simply type in brew install git at the terminal and press Enter.
And that’s it!

GitHub.

You will also need a GitHub account. Since this is an extensive topic, this is covered in Subsection 3.1.1.