Git is a free and open-source distributed version control system used for tracking changes in the programming source code across different teams and revision levels. It is a well-known platform due to its distributed development model, data integrity, non-linear workflows, and speed.
In this tutorial, we are going to explore how to install Git on Windows Server 2022. Let’s start the Git installation.
Prerequisites
- Windows Server should be installed on your system.
- Administrative privileges
- Need Username and password to set for GitHub.
- Source code editor
Installation of Git on Windows Server 2022
Perform the following steps to install the Git on Windows Server 2022:
Step 1: Download the Git setup for Windows
To install Git on Windows Server 2022, we can download the Git installation setup from the official Git website. At the time of writing this tutorial, the latest Git version 2.35.1 is available for installation. To install the latest Git version on your Windows server, click on the ‘Download for Windows’.
Now, download Git for windows setup for 64-bit system architecture.
Step 2: Run Git installer/ setup on Windows Server 2022
Once the Git is downloaded, navigate to the download locations and double-click on the Git setup to extract and launch the Git installer.
Read the information about GNU General Public information and click on ‘Next’ to continue the Git installation.
Select the location where you want to install Git in the windows server. Click on the ‘Next’ option to proceed with the default location for installation.
Select the Git components that you want to install. Continue with default components selection by clicking on the ‘Next’.
The Git installation setup will create a start menu folder. Continue with ‘Next’.
Choose the text editor using the drop-down, which you want to use with Gi and then click on ‘Next’.
Now, choose the name of the initial branch. By default, this is ‘master’. Continue with default to click on ‘Next’.
Now, you will choose the SSH secure shell client program, which you want Git to use. Leave this option as default and click on ‘Next’.
Choose the SSL/TLS library that you want Git to use for HTTPS connections. Continue with default with the ‘Next’ option.
Now, choose the option for line-ending conversion in Git. Again, proceed with the default selection.
Now, select the terminal emulator that you want to use with Git bash. Use the default MinTTY and click on ‘Next’.
Choose the behavior for the ‘git pull’ command. Continue with the default selection.
Select the ‘Credential helper’. Again, leave this option as default and click on ‘Next’.
Configure extra features and proceed with default settings.
Now, click on the ‘Install’ to start the Git installation on Windows Server 2022.
The installation of Git will take a few minutes to complete on your windows server.
Once the Git installation is completed, click on the ‘Finish’ to exit from the setup.
Step 3: Launch Git on Windows Server 2022
Two modes are available to use in the Git environment. Git GUI (Graphical User Interface) and a Git bash shell.
To launch the Git GUI click on the start menu and locate ‘git gui’ using the search bar. Click on the git gui to launch it.
To launch the Git bash shell, locate ‘Git bash’ using the search bar and click on the ‘Git Bash’ icon to launch the terminal.
Check Git version
Open the ‘Windows PowerShell’ and type the following command to check the installed Git version:
> git –version
Step 4: Configure Git on Windows Server
After completing the Git installation, configure the username and email through the command line. Run the following command in the terminal to configure username and email:
$ git config --global user.name "samreena" $ git config --global user.email "saam@gmail.com"
Now, verify the Git configuration by using the following command in the terminal:
$ git config –list
You can also run the above command on Windows PowerShell.
Conclusion
Congratulations! The Git installation is completed on Windows server 2022. Now, you can use it on your system. You can start using Git on your Windows system. Find the Git tutorials via the internet to explore more about the Git commands. Thanks!
- Your search to the best windows hosting can end by clicking here.