Git Installation
Install Git on Windows
Git for Windows stand-alone installer
Download the latest Git Windows the stand-alone installer from the following page https://git-scm.com/downloads
When you started the git installer, you will see the Git Setup wizard screen. Choose the Next and Finish prompts to complete the installation. Default options are suitable for most users.
Open Git Bash or Windows Command Prompt. (if during the installation you choose not to use Git from the Windows Command Prompt, you should use Git Bash)
To check that the installation of Git complete with success, type the following command
$ git version git version 2.29.2
On the output, you will see the corresponding version of your installed Git.
Configure your Git username and email by running the following commands. This information will be associated with any commits that you add.
$ git config --global user.name "expectocode" $ git config --global user.email "user@expectocode.com"
Install Git on Linux
Debian/Ubuntu (apt-get)
From your terminal, start the general OS and package update.
$ sudo apt-get update
To install Git, run the following command:
$ sudo apt-get install git
the command below will install Git on your system, but it may ask you for some confirmations.
Check if the installation was successful by typing:
$ git --version git version 2.29.2
On the output, the version will correspond to the version of Git you installed.
Configure your Git username and email using the following commands:
$ git config --global user.name "your name" $ git config --global user.email "yourmail@expectocode.com"
Install Git on Mac OS
There are different ways to install Git on Mac. It comes included with Xcode or its other command-line tools. Git may be already installed. To find out, type this command on the terminal:
$ git --version
git version 2.27.0 (Apple GIT-66)
Apple supports Git, but it tends to lag behind mainstream Git by serval major versions.
Git for Mac Installer
The simplest method to install Git on Mac is by using the stand-alone installer.
Download the last version of Git by visiting the official page https://git-scm.com/downloads.
Follow the prompts to install Git.
To verify the installation was successful, type the following command:
$ git --version git version 2.29.2
Configure your Git username and email using the following commands:
$ git config --global user.name "expectocode" $ git config --global user.email "user@expectocode.com"
Install Git with Homebrew
If you are using Homebrew to manage package on OS X, you can follow the steps below:
From your terminal, install Git using Homebrew:
$ brew install git
Verify if the installation was successful by typing the following command:
$ git --version git version 2.29.2
Configure your Git username and email using the following commands:
$ git config --global user.name "expectocode" $ git config --global user.email "user@expectocode.com"
Install Git with MacPorts
If you are using MacPorts to manage package on OS X, you can follow the steps below:
From your terminal, update MacPorts:
$ sudo port selfupdate
Search the latest available Git ports and variants:
$ port search git $ port variants git
Install Git and some extra tools that will help Git in different manners.
$ sudo port install git