Sitemap
Upetha Udaiyar

Upetha Udaiyar

Git and GitHub Tutorial

4 min readJul 31, 2026

--

Hello and welcome to my blog. For this week’s project we will cover a few basics about GitHub. The topics we will cover here will consist of git push,pull,commit,merge.

Git

  • Git is a version control system.
  • Git helps you to keep track of code changes.
  • Git is used to collaborate on code.

What is version control?

Version control software allows individuals and teams to track and maintain projects. Different versions of the same project can be maintained, edited, and merged. All of this can be done either locally or online.

GitHub

  • GitHub is a web based Git repository hosting service
  • GitHub is not the only web based platform. There are few alternative platforms. for example
  1. BitBucket
  2. GitBucket

How to install Git

  1. search git download in your browser.
  2. open the link which shows git download.
  3. choose your OS and download it from the browser.
  4. After downloading Git you can use it as your local repository.

How to create an account in GitHub

  1. Visit github.com and click Sign up.

2.Choose a clean, professional username (think memorable and related to your brand or name).

3.Verify your email and enable two-factor authentication (2FA) immediately — security first.

4.Stick with the Free plan. It gives you unlimited public and private repositories, 2,000 GitHub Actions minutes per month, and access to many modern features.

Create your first repository

  1. Log in → Click the + icon in the top right → New repository.
  2. Name it (e.g., hello-world).
  3. Add a short description.
  4. Check Add a README file.
  5. Click Create repository.
  6. Your repo now has a homepage with a README — the perfect place to describe your project.
Press enter or click to view image in full size

Key Git Concepts

  • Repository: A folder where Git tracks your project and its history.
  • Clone: Make a copy of a remote repository on your computer.
  • Stage: Tell Git which changes you want to save next.
  • Commit: Save a snapshot of your staged changes.
  • Branch: Work on different versions or features at the same time.
  • Merge: Combine changes from different branches.
  • Pull: Get the latest changes from a remote repository.
  • Push: Send your changes to a remote repository.

Commit

Get Upetha Udaiyar’s stories in your inbox

Join Medium for free to get updates from this writer.

A commit is like a save point in your project.

It records a snapshot of your files at a certain time, with a message describing what changed.

You can always go back to a previous commit if you need to.

Here are some key commands for commits:

  • git commit -m "message" - Commit staged changes with a message
  • git commit -a -m "message" - Commit all tracked changes (skip staging)
  • git log - See commit history

staging

The staging environment (or staging area) is like a waiting room for your changes.

You use it to tell Git exactly which files you want to include in your next commit.

This gives you control over what goes into your project history.

Here are some key commands for staging:

  • git add <file> - Stage a file
  • git add --all or git add -A - Stage all changes
  • git status - See what is staged
  • git restore --staged <file> - Unstage a file

git clone

git clone is a Git command-line utility that is used to target an existing repository and create a clone, or copy of the target repository. The command for cloning the repository is :

git clone <repository-link>

for e.x. : Let’s say you want to clone the TensorFlow repository.

Press enter or click to view image in full size

Press enter or click to view image in full size

use the link to clone this repository.

git pull

Use git pull to get all the changes made by users after the last time you cloned or pulled the project.

git pull <optional_remote> <branch_name>

git push

Use git push to update remote refs.

git push

--

--