Getting Started with Git
New to Git? By the end of this page you will know what Git is, have it installed, and be comfortable enough in a terminal to use it.
What is Git?
Git is a tool that keeps a full history of every change ever made to your project. Think of it like a save system in a video game — except instead of one save slot, you have thousands, all labelled with what changed and when. You can go back to any point in history at any time.
When you work with a team, Git also makes sure everyone's changes can be combined together without overwriting each other's work.
The four areas you need to know:
not tracked yet
next commit
on your machine
the team
- Your Files — the files you are actively editing right now
- Staging Area — changes you have chosen to include in your next save point
- Your Local Copy — your complete project history, stored on your own machine
- The remote (GitHub, GitLab, …) — the shared copy your whole team can see and download
Install Git
Go to git-scm.com and click the Windows download button. Run the installer. Most options can stay as default, but pay attention to these screens:
- "Choosing the default editor" — change this to Visual Studio Code if you use VS Code, or leave it as Notepad
- "Adjusting your PATH environment" — keep the recommended option: "Git from the command line and also from 3rd-party software"
- "Configuring the line ending conversions" — keep the default: "Checkout Windows-style, commit Unix-style line endings"
Once installed, open Git Bash (search for it in the Start menu) or PowerShell and verify it worked:
git --version
You should see something like git version 2.47.0 (Windows builds add a .windows.1 suffix). If you do, Git is installed.
Terminal Basics
A terminal (also called a command line or console) is a text window where you type commands. You will use it to run all Git commands. There are two options on Windows:
- Git Bash — installed with Git. Uses Linux-style commands. Most Git tutorials online use this.
- PowerShell — built into Windows. You may already know it. Git commands work the same, but some other commands look different.
How to open a terminal:
- Git Bash: Press Win, type
Git Bash, press Enter - PowerShell: Press Win + X, then click Windows PowerShell or Terminal
Essential commands to navigate folders:
# Show where you are
pwd
# List files and folders here
ls
# Move into a folder
cd FolderName
# Move up one level
cd ..
# Create a new folder
mkdir my-project
# Clear the screen
clear
Opening a Terminal from Your IDE
You do not need to open a separate terminal window — both IDEs have one built in.
Visual Studio Code:
- Press Ctrl + ` (backtick, the key above Tab) to open the integrated terminal
- It opens in Git Bash by default if Git Bash is installed
- To switch to PowerShell: click the + dropdown arrow in the terminal panel → select PowerShell
Visual Studio:
- Go to View → Terminal to open the Developer PowerShell
- Alternatively, right-click the solution in Solution Explorer → Open in Terminal
The IDE only changes where you open the terminal — the Git commands themselves are identical in every IDE, every editor version, and every operating system.
Verify Your Setup
Let's make sure everything works end-to-end by cloning a real repo.
Go to any project your team has on GitLab or GitHub, copy its HTTPS clone URL (see Clone a Repo), then run:
git clone <url>
cd <repo-folder>
git log --oneline -5
If you see a list of recent commits, your setup is working. You are ready to use Git.