Advertisement
linuxserver Git is one of the most essential tools every developer needs—whether you’re building websites, applications, or even learning programming for the first time. It helps you track your code changes, backup your work, and collaborate with others. If you’re a complete beginner who has never touched Git before, don’t worry!

How to Install and Use Git for Beginners (Complete Step-by-Step Guide)

5 Min Read Verified Content
This guide is designed specifically for newbies and “dummy-level” learners. We’ll walk step-by-step through installing Git, configuring it, creating your first repository, committing your first file, and pushing it to GitHub. This tutorial is long, detailed, SEO-friendly, and perfect for anyone who wants to start using Git confidently.

1. What is Git? (Explained Super Simply)

Git is basically:

  • A tool that saves versions of your project

  • A time machine for your code

  • A safety system to avoid losing files

  • A collaboration tool used by all professional developers

Think of Git as “Google Drive for programmers—but smarter.”

You don’t need to be a genius to learn Git. You only need small steps, which we’ll take together.




2. Step 1 — Download Git

To install Git, follow these beginner-proof instructions:

For Windows

  1. Go to: https://git-scm.com/downloads

  1. Click Download for Windows

  2. Open the installer (.exe)

  3. Keep clicking Next (default settings are okay)

  4. Click Install

  5. Wait until it finishes

For macOS

  1. Open Terminal

  2. Run this command:

  1. xcode-select --install
  2. Or download Git from git-scm.com

For Linux (Ubuntu / Debian)

Just run:

sudo apt update sudo apt install git

simply !. Done.




3. Step 2 — Check Git Installation

Open Terminal or Command Prompt and type:

git --version

If you see something like:

git version 2.43.0

…you’re ready for the next step!



4. Step 3 — Configure Git (Important for GitHub)

Git needs to know who you are so it can attach your name to your work.

In your Terminal, type:

git config --global user.name "Your Name" git config --global user.email "your@email.com"

What this does

  • user.name → Your identity

  • user.email → Links your commits to GitHub

Make sure the email matches your GitHub email if you want commits to show on your profile.




5. Step 4 — Create Your First Git Project

Now let’s create your first project (repo).

  1. Create a new folder

  2. Open it

  3. Right-click → “Open Terminal here”

  4. Run:

git init

You just created your first repository.
Congratulations — you’re officially using Git!




6. Step 5 — Add a File to Git

Inside your new folder, create a file:

hello.txt

Add some text inside it:

Hello Git! This is my first file.

Now tell Git to track this file:

git add hello.txt

This means “Git, please watch this file.”




7. Step 6 — Commit Your File

Now save this version in Git:

git commit -m "First commit"

This is like saving a snapshot of the file.

For beginners:

  • A commit = a saved version

  • -m = message describing what you saved




8. Step 7 — Create a GitHub Account (If You Haven’t Already)

Visit:
https://github.com/

  1. Sign up

  2. Choose a username

  3. Verify your email

GitHub is like the cloud storage for your Git projects.




9. Step 8 — Create a New GitHub Repository

On GitHub:

  1. Click the + button

  2. Select New repository

  3. Name it (example: my-first-git-project)

  4. Click Create repository

GitHub will show you instructions — but don’t worry, we’ll do it step-by-step.




10. Step 9 — Connect Git to GitHub

In your Terminal, copy the GitHub command:

git remote add origin https://github.com/USERNAME/my-first-git-project.git

Replace:

  • USERNAME → your GitHub username

This connects your computer to GitHub.




11. Step 10 — Push Your Project to GitHub

Finally, upload your project:

git branch -M main git push -u origin main

If you get asked for login:

  • Enter GitHub username

  • Enter GitHub personal access token (GitHub password is no longer supported)

After pushing, refresh your GitHub page — your file is now online!


Advertisement
Back to Linuxserver