Git
Git Tutorial for Beginners with Examples
Install Git
Add Local Project to Remote Git Repository
How to Clone a Project from a Remote Git Repository
Create a New Branch in Git
Switching Branches in Git
How to Push Code from Local to Remote Repository
Pushing a New Local Branch to a Remote Git Repository
Deleting a Git Branch Both Locally and Remotely
Restoring a Deleted Git Branch
Switching to a Different Branch Without Committing Changes in Local Git Repository
Git Stash Revert: How to Restore Stashed Changes in Git
Creating a Git Pull Request
Cancel a Git Pull Request
Tags in Git
Git Commands for Beginners
Generating a Personal Access Token on GitHub
Update the Local Branch with the Latest Code Changes from the Remote Branch
Compare Two different Git Branches in Visual Studio Code
Install Git on Windows | Ubuntu | Linux | macOs
- Last updated Apr 25, 2024
Learn how to install Git on various platforms, including Windows, macOS, and Ubuntu.
Installing on Windows
Follow these steps to install Git on Windows:
- Go to the official download site of Git at https://git-scm.com/download/win and download the latest "64-bit Git for Windows Setup" Standalone Installer file for Windows.
- After the download is complete, simply run the .exe file by double-clicking on it and follow the installation wizard until the installation is complete.
- Verify the installed version of Git by executing the following command in your terminal:
git --version
This command displays the installed version of Git on your system.
Installing on Ubuntu
Follow these steps to install Git on Ubuntu:
- Open a terminal and execute the following commands sequentially:
- Verify the installed version of Git by executing the following command:
sudo apt-get update sudo apt-get install git sudo add-apt-repository ppa:git-core/ppa sudo apt update sudo apt install git
git --version
Installing on macOs
Follow these steps to install Git on macOs:
- Open the terminal.
- If you haven't installed Homebrew on your Mac, you can do it by typing the following command in the Terminal:
- After Homebrew is installed, you can install Git by running the following command:
- Verify the installed version of Git by executing the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install git
git --version