Skip to content

Install Git

Git is a small program that needs to be installed on your local machine and can be utilized from a command line (CLI) tool or from an IDE. Although there are many tools available, for these labs, we will use the Git CLI within a Unix environment. Then we will setup SSH keys from our local machine to the remote server.

If you are on network, you may need to temporarily disconnect the VPN during the local setup steps for Git installation and SSH keys.

The steps below installs Git. For Mac users, there is no additional setup. For Windows users, we will setup Git Bash from the installer. All labs and examples will follow these Unix-style commands.

Install Git

  • For all users (Mac and Windows), download Git
  • For Windows users only, follow the instructions in the installer to complete additional setup for Git Bash
Recommended settings for Git Bash If you aren't sure which options to select from the Git Bash installer, you can [use this guide](https://phoenixnap.com/kb/how-to-install-git-windows). > If you are on a networked mapped directory, do **NOT** open Git Bash yet. Git Bash will set your home as the root of your directory and will take a long time to open. We can define a proper start directory by following the directions on [this post](https://stackoverflow.com/a/56478878). Git is also [available in PowerShell](https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-PowerShell) (and other tools), but be aware of the specific Unix-style commands for Git Bash used in these examples in the labs as the differences with your tool.

Configure Git CLI

Once we have Git installed, open your CLI (Git Bash for Windows; Terminal for Mac) and enter the following commands to define global values. This metadata identifies yourself and will be attached to all code changes.

git config --global user.name "Your Name"
git config --global user.email name@company.com