
Most versions of MacOS will already have Git installed, and you can activate it through the terminal. Open Terminal and run the following command. If Git is installed, it will print the version. If it is not installed, macOS will prompt you to install it.
git --version

You can install Git via the package management tool for your Linux distribution. GitHub has a detailed Install Git for Linux guide with instructions for different operating systems.
Once installed, (Windows users), search for Windows Powershell and launch it. (Mac/Linux users): Launch a Terminal window.
Run the following commands to set your name and email. Make sure to
change <Your Name> and
<your-email@example.com> with your own details.

GitHub offers a Command-Line Interface (CLI) to manage your GitHub account. We will install and configure it so you can push updates to your GitHub repositories.
Search for Windows Powershell and launch it. Enter the following command and follow the installation prompts.
winget install --id GitHub.cli

In case you have trouble with this method, Github also offers pre-compiled binaries that can be downloaded and installed directly.
You can install the GitHub CLI via Homebrew. In case you do not have Homebrew install, head over to Homebrew and install it first.
Open a Terminal and enter the following command
brew install gh

In case you have trouble with this method, Github also offers pre-compiled binaries that can be downloaded and installed directly.
Visit GitHub CLI Linux & Unix Installation guide for instructions for your distribution.
You will need a GitHub account for this section. If you do not have one, visit GitHub.com and create a free account.

GitHub.com as the response for Where do you
use GitHub? and press Enter. Next, select
HTTPS as the response for What is your preferred
protocol for Git operations on this host? and press
Enter.
Login with a web browser as the option for
How would you like to authenticate GitHub CLI? and press
Enter.





Your setup is now complete.
If you want to report any issues with this page, please comment below.