Chapter 2. Git & GitHub Initial Settings

Key Tool Preparation (2) – Windows

Key Tool Preparation (2) – Windows
Tag:

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".

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Finally, click on the Install button.

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Check Launch Git Bash and click on Finish.

Key-Tool-Preparation-2--Windows

You can check what Git Bash looks like.

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

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

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

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--Windows

Click on the Install button and complete the installation.

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--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".

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Finally, click on the Install button.

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Check Launch Git Bash and click on Finish.

Key-Tool-Preparation-2--Windows

You can check what Git Bash looks like.

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

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

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

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--Windows

Click on the Install button and complete the installation.

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--Windows

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.

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--Windows

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

Key-Tool-Preparation-2--Windows

Tag: