How to install and configure Git on Windows OS ?
Published: 2021-06-23 13:32:36

>> I will also soon be publishing it on [GeeksforGeeks](https://www.geeksforgeeks.org/)

## Introduction✨
In this blog, you will be learning how to install, setup and configure Git on Windows OS. This will take, like 10 minutes!, it's that easy.

![git](https://img.pngio.com/git-logo-png-5-png-image-git-png-180_180.png)


## Let's get started!

![comp](https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=750&q=80)


### Step one - Installation
* Go to the [download page](https://git-scm.com/downloads).
* Download the Software for Windows.

![download](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fwigvq6kupwvrjomqh8y.png)

* Click on the downloaded .exe file
![install1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ooodmf3bbx71ifv06t0.png)

*****************************************************************

### Step two - Set-up
* Allow the app to make changes to your device by clicking **Yes** on the User Account Control dialog that opens.
![setup1](https://phoenixnap.com/kb/wp-content/uploads/2021/04/start-git-installation-process-windows.png)

* Give GNU General Public License a read, and then click on **Next**.
![setup2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zd87dx8mue81kw5bt7hm.png)

*****************************************************************

### **It is recommended to leave the options as default in the next few steps**.

* Leave the installation location on default and click on **Next**.
![setup3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/as023rs3okj8hjz0n5ix.png)

* Leave the installation components on default and click on **Next**.
![setup4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eu1wlr73j8j3d6a1a2e1.png)

* Set up will create the program's shortcut in a Start Menu folder. Click **Next**.
![setup5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lov4tnq7prjh6esf2d7x.png)

* Open the **drop-down menu** to select a text editor of your choice. I have chosen VS Code here.
![setup6](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qnnu5tkkw791s78izws.png)

* Set up for Git to name the branch after "git init". Leave it on default.
![setup7](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vq1dumbgv1sd7fe4971c.png)

* Adjusting your path environment - Select the **recommended** option.
![setup8](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ujdzkhqeb8kvdaraqc6d.png)

* The next option relates to server certificates. If you’re working in an Active Directory environment, you may need to switch to Windows Store certificates. Click **Next**.
![setup9](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ah1q9tr5r2t2wetj35n6.png)

* Configuring the line ending conversions : Recommended to select the default option. 
![setup10](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0p8oklr9j6mvlva8brn7.png)

* Choose the terminal emulator you want to use. The default MinTTY is recommended, for its features. Click on **Next**.
![setup11](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpcac4ge6ikjs1hcr4e2.png)



* Default behavior of git pull : Default option
![setup12](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5v9407gr6880ffxx82j1.png)

* Choose a credential helper : Git Credential Manager Core
![setup13](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z283jkeaiwdt8pd2c2j4.png)

*****************************************************************

### **From here, the options are customizable, you can leave it default if you want.**

* Default option recommended. If you want to use symbolic links, which are like shortcuts for the command line, tick the box. Click **Next**.
![setup14](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvk0bv6koa5qglevt7hp.png)

* Click on **Install** after customization.
![setup15](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15mipurdwgkbnzjdgo5k.png)

*****************************************************************

### **Finish the Git setup**

* Click on **Finish**.
![setup16](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d25gag5xcw9749h7js7o.png)


* Launch Git Bash : Simply go to Start on your Windows, and then you will find a folder "Git". Click on it.
![setup17](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1w8tdsu3o8dgk3pmxqid.png)

*****************************************************************

### Step three - Make a test Directory
* Git command to make a new directory :
```
mkdir test
```
![mkdir](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0773h8r7d9l6j9g6r5kv.png)


*  To go into the test folder :
```
cd test
```
![cd](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3besgpb9qc9vw4wkx8xi.png)

* To initialize it : Initializes an empty Git repository.
```
git init
```
![init](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8i56fphwci55cvbqv4yk.png)

* Go into the **file path** as shown on your terminal in the above step. As you can see below, a folder **test** has been created!

![test](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4irzpgcutucog6szoijm.png)

* To clear your terminal :
```
clear
```
![clear](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nu0x115q02s0ga6iehy9.png)

*****************************************************************

### Step four - Learn basic Git commands (Optional)
After making a directory, now you can add files to this directory!
You can learn Git commands from the resources in my blog below 
👇
{% link https://dev.to/supritha/learn-basics-of-git-and-github-from-these-free-resources-7f4 %}

*****************************************************************

### Step five - Configuration

* Configure Git with your username. Enter your **full name** or **GitHub username** in the code below.
```
git config --global user.name "Your-Full-Name-here"
```
![configuser](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/seqxo0gr7kn76iq3yify.png)

*****************************************************************

* Configure Git with your e-mail. Enter your email address in the code below.
```
git config --global user.email "your-email-address-here"
```
![configmail](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rnjk6mh0ef9twkxqnk4x.png)

Next, you can run
```
git config --list
```
*****************************************************************

* Configure Git with your chosen code editor.

If you use VSCode :
```
git config --global core.editor "code --wait"
```
![vscode](https://azurecomcdn.azureedge.net/cvt-e3a122c14d54133f4987ad39a20b68bf418820b5ebac6c6a421232bba29588e9/images/page/products/visual-studio-code/vscode-logo.png)

****************************************************************

If you use Sublime Text :
```
git config --global core.editor "'C:/Program Files/Sublime Text 2/sublime_text.exe' -n -w"
```
![sublimetext](https://forum.sublimetext.com/uploads/default/original/3X/7/4/7483840f98832d90e041a4c650e4ee0666572a1a.png)

****************************************************************

If you use Atom Editor :
```
git config --global core.editor "atom --wait"
```
![atom](https://www.pngkey.com/png/full/352-3528445_open-atom-text-editor-icon.png)

*****************************************************************

### You're all set up if -
✅ You've installed Git.
✅ You've configured Git with username and email.
✅ You've configured Git to your chosen editor.

*****************************************************************

## Thank you for reading!🙌
Share your views in the comments down below! :) 
[My twitter](https://twitter.com/SuprithaRavish1)

Like it and share it for more such articles.

### Like what I do?  
#### Support me by [buying me a coffee ☕](https://www.buymeacoffee.com/suprithaa).