If you don’t already have a text editor (e.g., Sublime, TextWrangler) installed, install GitHub’s Atom editor (Recommended: Install Autocomplete Plus and Autoclose HTML. Go to Atom > Preferences > Install then search for autocomplete plus, autoclose html and click Install.
Download & install (or upgrade) Xcode command line tools. For Yosemite (OS X 10.10+), follow these instructions (Scroll down a bit to the section “MacOS Yosemite.” You”ll need to create a Mac Developer account if you don’t already have one.)