In my previous post, I discussed how to install Microsoft PowerShell and VMware PowerCLI on MacOS. This is the second part of my three-part blog series on configuring Git with VS Code for MacOS. In this post, I’ll cover how to download and install both Git and Microsoft Visual Studio Code.
Git with VS Code for MacOS:
- Part 1 – Installing Microsoft PowerShell and VMware PowerCLI
- Part 2 – Installing Git and VS Code (this post)
- Part 3 – Configuring Git and VS Code
Installing Git on MacOS
Before installing Microsoft Visual Studio Code, I recommend installing Git first, so that VS Code can detect the install. Otherwise, there won’t be any source control provider registered the first time VS Code is launched.
The latest release of Git can be downloaded here: https://git-scm.com/downloads. Now, for the systems I’ve tried this on, the download doesn’t automatically start for some reason. For me, I’ve always had to click on the Click here to download manually link to get things moving along.
Once Git has been downloaded, double-click on the *.dmg file that was downloaded. Once the disk image (dmg) is mounted, double-click the git-<version>-intel-universal.pkg file to begin the installation process.
On the Macs I’ve tested, this software package is almost always blocked by MacOS Security for being from an unidentified developer. If this warning appears, don’t panic… there’s a way to get around it. First, click OK to close the dialog box.
Then, go to System Preferences then Security & Privacy. In the General tab, near the bottom of the window, will be an Open Anyway button. This will launch the Git package installer again.
This time, the unidentified developer dialog will show the option to Open or Cancel. Click Open to start the Git install process.
Unfortunately, because the System Preferences / Security & Privacy window is still be open at this stage, it may hide the Git install window. Either close or minimize the System Preferences window to display the Git Installer window. In the Install Git: Introduction window, click Continue.
In the Git Install: Installation Type window, simply click Install. Optionally, if you have a specific location where you install applications, use the Change Install Location… button to confirm or change the installation path.
Enter administrative credentials for MacOS to authorize the installation, then click Install Software.
On the Git Install: Summary window, click Close.
Afterwards, an additional dialog opens asking to move the downloaded *.dmg file to the trash. Personally, I click Move to Trash here to keep things clean.
Installing VS Code on MacOS
Download Microsoft Visual Studio Code
The latest version of Visual Studio Code for MacOS can be downloaded from https://code.visualstudio.com/Download.
Download VS Code for MacOS and save it to your local system. In this example, I’m downloading a copy to my local Downloads (~/Downloads) folder.
After VS Code has downloaded, extract the contents by double-clicking on the *.zip file that was downloaded earlier. This will place a copy of the Visual Studio application in the same folder. Technically you could just run VS Code from here, but I like to keep my apps organized, so let’s move it to our Applications folder (/Applications) in the next step.
‘Installing’ VS Code on MacOS
After extracting the Visual Studio Code app, drag it to the /Applications folder (or whatever directory you prefer to store your Apps) on the Mac.
Launch the Visual Studio Code app from the Applications folder. At first launch, you’ll be prompted with a security warning about this application being downloaded from the Internet. Click Open to proceed.
And there we have it! Microsoft Visual Studio Code is now installed on MacOS!
In addition to the blog post above, I also created this tutorial video to walk through the process of installing Git and VS Code on MacOS.
In the next blog post, I’ll discuss how to configure Git and VS Code to communicate and synchronize with GitHub. As always, thanks for stopping by, and I hope you enjoyed this tutorial. Be sure to check out the next (and final) part in this blog series, Git with VS Code for Mac: Part 3 – Configuring Git and VS Code.