Git with VS Code for Mac: Part 2 – Installing Git and VS Code

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:

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.

Download Git

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.

Download Git (note: you may have to click the download manually link to proceed)

Installing Git

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.

Double-Click the *.pkg file

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.

Click OK to dismiss the unidentified developer dialog

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.

Open System Preferences
In System Preferences, go to Security & Privacy (General tab)

This time, the unidentified developer dialog will show the option to Open or Cancel. Click Open to start the Git install process.

Click Open

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.

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.

Click Install

Enter administrative credentials for MacOS to authorize the installation, then click Install Software.

Enter administrative credentials and click Install Software

On the Git Install: Summary window, click Close.

Success! 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.

Optional: Move the original download to the Trash

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

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.

Download a copy of the VS Code app to your system

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.

Extract the VS Code from the *.zip file

‘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.

Drag the VS Code app to your Applications folder

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.

MacOS Security Warning

And there we have it! Microsoft Visual Studio Code is now installed on MacOS!

Microsoft Visual Studio Code on MacOS

Related Video

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s