Wbzard Labs
Git and GitHub for Beginners: The Commands and Habits Every Fresher Needs
Back to Blog
Careers24 October 2026Vivek3 min read

Git and GitHub for Beginners: The Commands and Habits Every Fresher Needs

In college, you might share code over WhatsApp or keep folders called project-final-v3-REAL. In a job, every team uses Git. It's one of the first things interviewers and senior developers expect you to know, whether you're a MERN developer or a DevOps engineer.

Git vs GitHub

  • Git is a tool on your computer that records every change to your code. You can go back to any earlier version, try ideas safely and merge work from other people.
  • GitHub is a website that stores Git repositories online. Teams use it to review code, track issues and deploy. (GitLab and Bitbucket do similar jobs.)

Setting up

  1. Install Git from the official website (on Windows this includes Git Bash)
  2. Set your name and email:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
  1. Create a free GitHub account with a professional username (your name, not coolboy_2005)
  2. Set up authentication with GitHub (an SSH key, or sign in through Git Credential Manager)

The commands you'll use every day

CommandWhat it does
git initStart tracking a folder with Git
git clone <url>Download a repository from GitHub
git statusSee what's changed
git add <file> / git add .Stage changes for the next commit
git commit -m "message"Save a snapshot with a message
git log --onelineSee commit history
git pushUpload your commits to GitHub
git pullDownload and merge others' changes
git branchList or create branches
git switch <branch> (or git checkout)Move to another branch
git switch -c <branch>Create a branch and move to it
git merge <branch>Merge another branch into the current one
git diffSee exactly what changed

How teams actually work

  1. Pull the latest main branch
  2. Create a branch for your task: git switch -c feature/login-form
  3. Make changes, commit in small steps
  4. Push the branch to GitHub
  5. Open a pull request (PR) describing what you did
  6. A teammate reviews, you fix comments, the PR is merged
  7. Delete the branch and start the next task

Practise this flow on your own projects. Interviewers often ask how you'd handle a merge conflict or a code review.

Writing good commit messages

  • Bad: changes, fixed, final
  • Good: Add login form validation, Fix cart total when coupon is removed

One logical change per commit. Present tense. Short first line.

Things that trip beginners up

  • Committing secrets. Never commit passwords, API keys or .env files. Add them to .gitignore. If you commit one by accident, change the key immediately; deleting the file isn't enough.
  • Committing node_modules. Add it to .gitignore.
  • Merge conflicts. Git shows both versions in the file. Choose the right code, remove the markers, then commit.
  • Working directly on main. Use branches, even on solo projects, to build the habit.
  • Being afraid to experiment. That's what Git is for. Commit, then try.

Make your GitHub profile work for you

  • A profile README with a one-line intro, skills and links
  • Pinned repositories: your best 4–6 projects
  • Each project with a README: what it does, screenshots, tech stack, how to run it, a live link
  • Regular commits over months rather than everything on one day

Which projects to build: portfolio projects that get freshers hired.

Where to go next

Git is a foundation. Next steps depend on your path:

Learn it with us

Both our live online courses for Shivamogga students use Git and GitHub from the first week, on real projects with code reviews: the MERN stack course and the DevOps course. See all courses.

Filed underCareers

Wbzard Labs

Want this done for your business?

We help founders in Bangalore and Shivamogga launch with a website, social media, SEO and ads that work together. Tell us about your business and get a free launch plan.