Key Tool Preparation (2) – Windows

Setting Up Git & GitHub on Windows

Preparing the Git environment in Windows is slightly complex. You need to install the Git software with several initial settings. For Windows, Powershell is usually used as a command line, but Git provides a Unix-based command line called Git Bash. In this course, we assume that Windows users are using Git Bash. For the text editor, we use VS code as an example. You can open Git Bash using VS code so that you can use a command line and text editor in the same application.

The choice of a web browser is less critical. For our demonstration purposes, we use Chrome when we explain with examples.

On this page, we'll explain how to install the latest Git software onto a Windows computer and prepare VS code as a text editor with Git Bash in the VS code window.

1. Install Git

To install Git onto Windows computer, follow the steps below.

Download Git installation package

Go to this site Git download for Windows and click on "Click here to download".

Install Git and Git Bash on Windows: Step 1

The Git installation package will be downloaded onto your computer.

Open the downloaded .exe file and follow the installation instructions.

First, you'll be asked to allow the app to make changes to your device. To start the installation process, click on Yes.

Once the installation process is initiated, you'll need to confirm many initial settings.

Click on the Next buttons in the following pop-up windows. You can also click on the Next button for the default editor setting without changing the selection. We can change the default editor to Visual Studio Code later.

Install Git and Git Bash on Windows: Step 2
Install Git and Git Bash on Windows: Step 3
Install Git and Git Bash on Windows: Step 4
Install Git and Git Bash on Windows: Step 5
Install Git and Git Bash on Windows: Step 6

For the initial branch name setting, you can change the default branch name to main; however, for practice purposes and to avoid complexity, select the first option. Continue clicking on the Next buttons in the following pop-up windows.

Install Git and Git Bash on Windows: Step 7
Install Git and Git Bash on Windows: Step 8
Install Git and Git Bash on Windows: Step 9
Install Git and Git Bash on Windows: Step 10
Install Git and Git Bash on Windows: Step 11
Install Git and Git Bash on Windows: Step 12
Install Git and Git Bash on Windows: Step 13
Install Git and Git Bash on Windows: Step 14
Install Git and Git Bash on Windows: Step 15

Finally, click on the Install button.

Install Git and Git Bash on Windows: Step 16
Install Git and Git Bash on Windows: Step 17

Check Launch Git Bash and click on Finish.

Install Git and Git Bash on Windows: Step 18

You can check what Git Bash looks like.

Install Git and Git Bash on Windows: Step 19

2. Install VS Code

VS Code is available on VS Code official homepage. Here are the steps to install VS Code on Mac.

Go to the official site. Select Windows to download VS Code.

Install and set up VS Code on Windows: Step 1

Open the downloaded .exe file and follow the installation instructions.

After opening the downloaded .exe file, agree to the software license.

Install and set up VS Code on Windows: Step 2

Click on the Next buttons again in the following pop-up windows.

Install and set up VS Code on Windows: Step 3
Install and set up VS Code on Windows: Step 4

For the additional tasks, check all the items so that you can open VS code in various ways.

Install and set up VS Code on Windows: Step 5

Click on the Install button and complete the installation.

Install and set up VS Code on Windows: Step 6
Install and set up VS Code on Windows: Step 7
Install and set up VS Code on Windows: Step 8

3. Set Git Bash as the default command line and open it in VS Code

Set Git Bash as the default command line

As Git Bash is not a default command line for Windows, you need to check the settings.

In the VS code window, click on the settings icon at the bottom left corner and select Settings.

Install and set up VS Code on Windows: Step 9

Type terminal.integrated.default profile: windows. and select Git Bash in the drop-down list.

Install and set up VS Code on Windows: Step 10

Open Git Bash in VS Code

To open Git Bash in the VS code window, click on Terminal in the top menu bar and select New Terminal.

Install and set up VS Code on Windows: Step 11

You can see that Git Bash is opened at the bottom of the VS code window.

Install and set up VS Code on Windows: Step 12

IdeaWindows Settings

If you are using Windows, it's helpful for you to know how to show extensions as well as hidden files and directories.

To show them, open Windows Explorer and check the following items on the top bar (Ribbon).

  • File name extensions
  • Hidden items