- Published on
5 Git Commands I Use Every Day (And You Should Too)
- Authors
- Name
- Godbless Nyagawa (Njox)
- @njox16
Table of Contents

Introduction
Since the early days of coding, developers have needed ways to keep track of their progress. Over time, several version control tools have come and gone—but Git has clearly taken the crown.
Quick reminder: Git is the actual version control software, and GitHub is a platform built around it.
In this post, we’ll walk through the six essential Git commands that I—and most devs—use every single day. Master these, and you'll seriously upgrade your workflow.
The Essential Commands
These are the core Git commands that power everything from kicking off a project to pushing code to production. Let’s break them down.
Git Init
This is the command that tells Git, “Hey, start tracking this project.”
Let’s say you’re working on a project named CIOS
. To start using Git with it, open your terminal, navigate to the project folder, and run:
git init
That’s it. Git creates a hidden .git
directory, and now it’s watching every change you make.
Git Add
git add
moves changes into Git’s staging area. This is like saying, “Hey Git, I'm thinking about saving these changes—get ready.”
Example: You’ve just added a new file called script.sh
. Here’s how you stage it:
# Add a single file
git add script.sh
# Add everything in the project
git add .
# Add only shell scripts
git add *.sh
# Add specific files
git add script.sh script.js
Heads up: Be careful with git add .
— you might accidentally include stuff like node_modules
, which you probably don't want in version control.
Git Commit
Once your changes are staged, it’s time to commit. Think of this as a snapshot — it locks in the current state of your code with a message describing what you did.
git commit -m "add script file for project setup"
Tips for better commit messages:
- Use present tense: “add,” not “added”
- Be short and clear
- Start with a verb like add, fix, update, or remove
Git Push
You’ve committed your changes locally. Now it’s time to share them with the world (or at least your teammates). git push
sends your commits to a remote repo like GitHub.
# Push to the default remote and branch
git push
# Push to a specific branch
git push origin main
Git Pull
Before making new changes, always sync up with the remote repo. git pull
grabs the latest updates from your teammates and merges them with your local code.
# Pull changes
git pull
# Pull from a specific branch
git pull origin main
Golden rule: Pull before you push. Avoid those annoying merge conflicts by making sure your local copy is up to date.
Git Clone
Want to start working on an existing project? Use git clone
to grab the full codebase from a remote repo and set it up locally.
# Clone a repo
git clone https://github.com/username/repository-name.git
# Clone into a custom folder
git clone https://github.com/username/repository-name.git my-project
Conclusion
Think of Git like a security camera for your code — it tracks what changed, who changed it, and when. These six commands are your daily go-to tools and cover most of what you’ll need in everyday development.
Sure, we’ve got AI tools now that can auto-generate commits or even automate full workflows. But knowing how Git works under the hood? That’s still essential. Let the AI assist — but you should stay in the driver’s seat.
Want to go deeper into AI and version control? Check out this related post: Faida na Hasara za Kutumia AI-Generated Commits.
Happy coding!