How to Install Git
When you attend a course that involves writing code, I ask you to use Git for version control. This allows me to review your code easily in addition to giving you the world’s best undo button.
Windows
I recommend installing msysgit, which gives you a special command prompt that allows you to use git without affecting other applications on your system. When you install, accept all the default customisation settings, then start the application Git Bash to see the command prompt.
Mac OS
You might already have git, but if you don’t, then my recommendation depends on your preference.
- For an installation package, try the Git OS X installer.
- If you use
macportsor any other package manager, try installing a package calledgit. - If you don’t already use homebrew to manage packages on Mac OS, then I recommend installing it. Then you only need to do
brew install git.
Linux
You might already have git, but if you don’t, then try your favorite package manager first, and if that fails, then you can always install from source.
Test your installation
Open your command prompt (or Git Bash on Windows), and try these commands.
$ mkdir try-git $ cd try-git $ git init
If these commands work, then your installation succeeded. Now you should read a few tutorials to learn some of the basic commands. You will need to know at least how to add files, remove files, and commit.




