codea
GitGitHubversion controlbeginners

What is Git and GitHub: a beginner's guide

What version control is, how Git differs from GitHub, the commands you'll use every day and how to work in a team with branches and pull requests.

October 17, 2026 · 2 min read

Every software team uses Git. Using it well is one of the first things people notice in your first job, and your GitHub profile is the first thing a technical recruiter looks at.

1. Git and GitHub aren't the same

  • Git is a version control program: it saves your project's history as snapshots called commits. You can go back, see who changed what and work in parallel. It runs on your computer, without internet.
  • GitHub is a website that stores copies of your repositories in the cloud and adds what you need to collaborate: Pull Requests, issues, code review and automation with GitHub Actions.

2. Git's three areas

Your changes go through three places:

  1. Working directory: the files you edit.
  2. Staging area: what you chose for the next commit (git add).
  3. History: the saved commits (git commit).
git init
git status
git add index.html
git commit -m "Add the home page"
git log --oneline

3. Branches: work without breaking main

A branch is a separate line of work. You create one per task, work in peace and, when it's ready, merge it into main.

git switch -c feat/contact-form
# ...changes and commits...
git push -u origin feat/contact-form

If two people touch the same lines, Git marks a conflict with <<<<<<<, ======= and >>>>>>>. It's no big deal: you choose which version stays, save and commit.

4. A real team's flow (GitHub Flow)

  1. One branch per task.
  2. Small commits with clear messages, in the imperative.
  3. push and a Pull Request with a title, description and screenshots.
  4. Code review: teammates comment and approve.
  5. Merge into main and delete the branch.

Many teams protect main to require a PR, an approval and passing automated checks from GitHub Actions.

5. What to build for practice

  • Your GitHub profile README (the repo with the same name as your username).
  • Your personal page, published for free with GitHub Pages.
  • Your first open source contribution: look for issues labeled good first issue and read the CONTRIBUTING.md.

6. Common mistakes

  • Pushing secrets (keys, .env). Use .gitignore and, if a key leaks, revoke it right away.
  • Huge commits with messages like "changes".
  • Using git push --force on a shared branch. If you must rewrite your branch, use --force-with-lease.
  • Running git reset --hard without knowing what it does. It discards changes without asking.

Git is key to getting your first junior developer job and it's the foundation of DevOps.

Next step

Codea's free Git and GitHub Jr route teaches you the terminal, commits, branches, Pull Requests, code review, open source and GitHub Actions in 4 weeks, with hands-on challenges and teacher review. Route content is in Spanish.

Learn this step by step, for free

Videos, hands-on challenges, quizzes and teacher reviews (route content is in Spanish).

Start the routeSee syllabus