# Git Bash installation

{% hint style="danger" %}
Be careful of downloading the Git version that is compliant with your system (Windows or MacOS)&#x20;
{% endhint %}

### Windows Installation

&#x20;If your not an expert on using GitBash, here there is a guide on how to download it:&#x20;

**Dowload Git for Windows:**

1. Open your web browser and go to the official Git for Windows website:[ Git for Windows](https://gitforwindows.org/).
   * Click on the "Download" button to download the installer.

     * You should download the installer from the GitHub page opening from the **Assets** section (refer always to the newest version in ***64bit.exe, like the*** [Git-2.43.0-64-bit.exe](https://github.com/git-for-windows/git/releases/download/v2.43.0.windows.1/Git-2.43.0-64-bit.exe))

     <figure><img src="https://2829430504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSleK316zl0BYwa7DfK2J%2Fuploads%2F2UADcayIa5yRXmCwGQkt%2FScreenshot_20240201_130331.png?alt=media&#x26;token=79bce847-9377-4689-821d-c4c18ccf6472" alt=""><figcaption><p>Newest version is the 2.43, last updated 01.02.2024</p></figcaption></figure>
2. **Run the Installer:**

   Once the installer is dowloaded, run the installer by double-clicking on the downloaded file (***Git-\<version>-64-bit.exe*** for 64-bit systems) in the Dowloads directory of you local computer to start the installation.

   * Click "Yes" to allow the installation.
3. **Configure the Installation:**&#x20;

   During the installation process, you'll be prompted to make various choices. The default settings are usually sufficient for most users.  <mark style="color:red;">**Make sure to select "Use Git from the Windows Command Prompt" during the "Choosing the default editor used by Git" step.**</mark>
4. **Complete the installation:**&#x20;

   Click "Next" or "Install" as needed. Once the installation is finished, click "Finish" to close the installer.&#x20;
5. **Verify Installation:**
   * Open the Windows Start menu and type **"Git Bash."** Click on the Git Bash icon to open the terminal.
   * Type **git --version** and press Enter. You should see the installed Git version information.

### MacOs Installation

&#x20;If you're not an expert on using GitBash, here there is a guide on how to download it:&#x20;

1. **Install Homebrew (if not already installed):**
   * Open Terminal, which you can find in the Applications > Utilities folder.
   * Install Homebrew by pasting the following command and pressing Enter:

{% code overflow="wrap" %}

```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

{% endcode %}

2. **Install Git using Homebrew:**

   Once Homebrew is installed, use the following command to install Git

```
brew install git
```

3. **Verify Installation:**

   After the installation is complete, you can verify it by typing **`git --version`** in the Terminal and pressing Enter. You should see the installed Git version information.

{% hint style="success" %}
Congratulations! You've successfully installed Git Bash on Windows and Git on Mac.
{% endhint %}

{% hint style="info" %}
Now you are ready to follow the [QuPath Tutorial](https://disc4all-qupath.gitbook.io/qupath-project/qupath-h-dab-docs/qupath-h-dab-tutorial) to analyse your slides
{% endhint %}
