Git and GitHub Tutorial
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
- BitBucket
- GitBucket
How to install Git
- search git download in your browser.
- open the link which shows git download.
- choose your OS and download it from the browser.
- After downloading Git you can use it as your local repository.
How to create an account in GitHub
- 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
- Log in → Click the + icon in the top right → New repository.
- Name it (e.g., hello-world).
- Add a short description.
- Check Add a README file.
- Click Create repository.
- Your repo now has a homepage with a README — the perfect place to describe your project.
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 messagegit 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 filegit add --allorgit add -A- Stage all changesgit status- See what is stagedgit 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
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




