21  Git

Git is akin to the “Track Changes” feature of Microsoft Word but is more powerful and tailored for tracking changes in code. It allows teams to work concurrently without overwriting each other’s work, thanks to its capabilities for handling multiple project versions.

Key features of Git include:

Explore “Learn Git Branching” to visually and interactively learn Git online.

21.1 Git version

To verify if Git is installed on your system, open your terminal (Mac) or command prompt (Windows) and type:

git --version

If you see a version number, Git is already installed. If not, follow the installation instructions below.

21.2 Installation

  • For Mac Users:
    • Option 1: Install XCode, which includes Git.

    • Option 2: Alternatively, install Homebrew (Homebrew is a free and open-source package management system that simplifies the installation of software on macOS and Linux.) and use this command:

      brew install git
  • For Windows Users:
    • Download Git from Git SCM and follow the installation instructions.