Git is a distributed version control system. (But you knew that already, because you totally completed a Git tutorial—right?)
There are several ways to go about making Git usable on Windows, but my favorite is to install the aptly-named Git for Windows. The great thing about Git for Windows is that it comes with Git Bash—a UNIX-style shell.
Please note that this is not the same Git for Windows that you’ll find on git-scm.com.
GitHub Desktop is a very nice, free graphical interface for Git. Although we’ll use Git from the command-line a great deal, we’ll also look at how GitHub Desktop can make certain tasks easier.
You’ll have a few choices to make during the setup process.
Adjusting your PATH environment: The second option is probably best: Use Git from the Windows Command Prompt. With this option, you’ll be able to use Git commands from the regular Windows command line, should you choose to.
Choosing HTTPS transport backend: Select the first option: Use the OpenSSL library.
Configuring the line ending conversions: Select the second option: Checkout as-is, commit Unix-style line endings.
Configuring the terminal emulator to use with Git Bash: You’ll install a different terminal emulator shortly, so your choice here is inconsequential. Just go with the first option: Use MinTTY (the default terminal of MSYS2).
Configuring extra options: The defaults here are fine.
Next, tell Git what name and email address it should use to sign code that you’ve authored. While you’re at it, tell it to use Code as the editor. Setup should have created a Git Bash shortcut. Launch Git Bash, and enter the following commands, substituting your actual name and email address:
git config --global user.name "Your Full Name" git config --global user.email "firstname.lastname@example.org" git config --global core.editor "code --wait"
Git Bash will present a command prompt, indicated by
$. We’ll generally prefix terminal commands with that symbol in our documentation. You’re not meant to type the
$ character, and it won’t be included if you copy and paste the commands from this site.