Installing Git on Windows


Hey, remember the last time you lost work on your project? 😭

We’ve all made that mistake at least once before adopting a source control management system (does this sound like an ad?).

In my last post, I walked through the installation of a package manager for Windows called Chocolatey, and we will continue to use it in this post to install Git. So, install Chocolatey if you’d like, and let’s get started!

Install Git

Chocolatey makes it incredibly easy and straightforward to install Git.

Open an Administrative Shell and run:

choco install git -y

Terminal with chocolatey install command

Unless you encountered connectivity or local machine issues, you now have Git installed! Restart your shell and verify the installation was successful using:

git --version

At some point, there will be a new version of Git you’ll want to download, which can come as a new Chocolatey package update, or you can update via a Git command.

Let’s cover both options next.

Update Git via Chocolatey

Here’s something you should know about Chocolatey (and most other packages managers). If you want to see the commands available to you, use the help command.

choco -?

Scroll up until you see the list of commands, and you’ll see one named outdated, which lists packages that are out of date on your machine. If you run this and see that Git is out of date, you can use the following command to update the Git package:

choco upgrade git

Update Git via Git Command

Another way to upgrade Git is using the update-git-for-windows command in an Administrative Shell:

git update-git-for-windows


Now that we have Git installed, we can source control our Unity projects to keep a history of changes, collaborate with others, and save ourselves from losing work!

We’ll talk more about using Git with Unity Projects in an upcoming post. Take care.

Leave a Reply

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

You are commenting using your 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