Quick Answer: How to Use Git on Windows?
Contents

The first thing we need to do is install Git on Windows; you can do so with the following steps:

  • Download and install the latest version of Git for Windows.
  • Use the default options for each step in the installation.
  • Remove Git Bash Desktop Icon.
  • Go to Start > All Programs > Git > Git GUI and make a Desktop Shortcut.

Click on the Environment Variables button at the bottom of the dialog box. Close the CMD prompt window if it is open already. CMD needs to restart to get the updated Path variable. Try typing git in the command line, you should see a list of the git commands scroll down the screen.Create your local repo

  • Navigate to the folder where your code is on the command line: cd /home/fabrikam/fiber.
  • Create a Git repo on your machine to store your code. You will connect this repo to VSTS in the next step.
  • Commit your code into the local Git repo. git add –all git commit -m “first commit of my code”

Installing Git. Once you have downloaded the msysGit executable, double click on it to start the installation wizard. Leave the default directory options. When you get to the “Adjusting your Path environment” setting, select the “Run Git from the Windows Command Prompt” option.Configure a simple Git PowerShell command window. Use the file explorer to navigate to :\Windows\System32\WindowsPowerShell\v1.0 and right-click on powershell.exe to create a shortcut on the desktop. Rename that shortcut to “Windows PowerShell (bootstrap)” and then move it to the Start Screen folder.Using Windows Explorer, find the local directory containing your files, right click on it and choose Git GUI Here, then Create New Repository. Enter the path of the local directory in the popup window, and click Create. This will create all the necessary files in your local directory for the local repository.

How do I download Git for Windows?

Install Git on Windows

  1. Download the latest Git for Windows installer.
  2. When you’ve successfully started the installer, you should see the Git Setup wizard screen.
  3. Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt).

How do I open a git bash file in Windows?

8 Answers. Start in is the folder you wish your Git Bash prompt to launch into. Git Bash uses cmd.exe for its terminal plus extentions from MSYS/MinGW which are provided by sh.exe , a sort of cmd.exe wrapper. In Windows you launch a new terminal using the start command.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest