DEV Community

Cover image for A free, beginner-friendly Git and GitHub course: 12 short written sessions, from your first commit to your own project on GitHub.
Mohin Sheikh
Mohin Sheikh

Posted on

A free, beginner-friendly Git and GitHub course: 12 short written sessions, from your first commit to your own project on GitHub.

What Is This Course?

Git and GitHub for Beginners is a free course that teaches the Git every developer uses at work, one small step at a time.

You start with an empty folder and finish with a real Node.js project on GitHub, built with branches and a pull request, the way teams work.

  • 12 sessions, each one a single page on GitHub
  • About 45 minutes per session, including practice
  • Completely free: no signup, no paywall, no videos to sit through

GitHub logo mohin-sheikh / git-and-github-for-beginners

A free, simple Git and GitHub course for beginners: commits, history, undoing mistakes, branches, merge conflicts, pushing to GitHub and pull requests. 12 short sessions with real commands, animated diagrams, exercises and interview questions.

Git and GitHub for Beginners

A free, simple Git and GitHub course for beginners. Learn to save your work with Git, go back when something breaks, try new ideas on branches, and share your code on GitHub. 12 short sessions with real commands, real output and animated diagrams.

Sessions Tested with Git 2.55 Published Free

The course in four parts: Git on your computer, branches, GitHub, and a final project, followed by your own projects on GitHub


Table of Contents


What You Will Learn

  • What Git and GitHub are, and why every developer uses them
  • Saving your work with commits, and reading your project's history
  • Undoing mistakes safely
  • Working on new ideas with branches, and fixing merge conflicts
  • Putting your projects on GitHub, and working on them from two places
  • Pull requests: how teams review and add each other's work
  • A real Node.js project on GitHub, with a .gitignore, a .env.example…

Is This Course for You?

This course is for you if:

  • You have never used Git, or Git still feels confusing
  • You copy Git commands from the internet and want to understand them
  • You can code a little and want to put your projects on GitHub
  • You are getting ready for your first developer job, where Git is used every day

What you need before you start

  • A computer with Windows, macOS or Linux
  • A code editor, such as VS Code
  • A free GitHub account (you create it in Session 09)

You do not need to know programming. Sessions 01 to 11 use simple text files. Only the final project uses a small Node.js app, and its code is given to you.


What Are Git and GitHub?

Without Git, a project folder slowly fills with copies like app-final.js, app-final-2.js and app-final-REAL.js, and nobody knows which one works.

Without Git, a folder fills with copies like app-final-2.js and nobody knows which one works; with Git, there is one app.js and Git remembers every version

Git saves a snapshot of your project every time you ask it to, so you can always go back. GitHub is a website that keeps a copy of your project online, so you can share it and work on it with others.

Git keeps the history of my-notes on your computer; git push sends a copy of the commits to GitHub, a website

Here is your first snapshot, a commit, from Session 03:

git add notes.txt
git commit -m "Add my first notes"
Enter fullscreen mode Exit fullscreen mode
[main (root-commit) 22a462d] Add my first notes
 1 file changed, 2 insertions(+)
 create mode 100644 notes.txt
Enter fullscreen mode Exit fullscreen mode

22a462d is the ID of the new commit, and Add my first notes is its message. Every command in the course is shown with its real output like this, so you can compare it with yours.


What You Will Learn

The course has 4 parts. Each part builds on the one before it.

The course in four parts: Git on your computer, branches, GitHub, and a final project, followed by your own projects on GitHub

Part Sessions What you learn
1. Git on Your Computer 01 to 06 Installing Git, your first commit, .gitignore, reading history, undoing mistakes
2. Branches 07 to 08 Working on a branch, merging, fixing merge conflicts
3. GitHub 09 to 11 Pushing, cloning, pulling, and pull requests
4. Final Project 12 Your own Node.js project on GitHub, with a README

Along the way you learn the commands developers use every day: init, status, add, commit, diff, log, restore, revert, branch, switch, merge, push, clone, fetch and pull.

👉 See all 12 sessions


What Makes It Different

  • Real output, every time. Every command was really run, and all 198 outputs in the course come from those runs. Where yours will differ, like your name, dates and commit IDs, the course tells you.
  • Real GitHub. The GitHub sessions were recorded on real repositories: real pushes, a rejected push, and real pull requests.
  • Easy to picture. 75 animated diagrams show what Git does when you run a command.
  • Learn from mistakes. Every session shows common beginner mistakes, with the real error message and the fix.
  • Short and simple. One file per session, and only the Git you need every day.
  • Windows, macOS and Linux. Where the steps are different, like installing Git or signing in to GitHub, the course shows each one.

What Every Session Contains

Part of a session What it gives you
Simple explanations One idea at a time, in plain words
Commands with real output What to type, and exactly what Git answers
Animated diagrams A picture of what is happening
Beginner mistakes The mistake, the real error, and the fix
Practice exercises Tasks to try on your own
Interview questions Short questions with clear answers

Across the course, that adds up to 60 beginner mistakes, 60 practice exercises and 60 interview questions.


The Final Project

In the last session you put a real project on GitHub, using everything from the course:

  • Build a small Node.js API with Express
  • Keep node_modules and your secrets in .env out of Git with a .gitignore
  • Add a .env.example and a README, so others know how to run it
  • Add a new feature on a branch, and merge it with a pull request
  • Clone the project into a new folder and run it, the way a teammate would

The files of hello-api pass through .gitignore: node_modules and .env stay on your computer, the other six files can go to GitHub

At the end you have a checklist you can use for every new project.


How to Start

Step 1: Open Session 01. It explains what Git and GitHub are. You don't need to install anything yet.

Step 2: Install Git in Session 02. It walks you through Windows, macOS and Linux, step by step.

Step 3: Make your first commit in Session 03, and keep going one session at a time.

Tips to get the most out of it

  1. Go in order. Every session builds on the ones before it.
  2. Type every command yourself. Don't copy and paste. Typing helps you remember.
  3. Run git status often. It tells you what Git sees right now, and what to do next.
  4. Do the exercises before you move on to the next session.

At one session a day, you finish in about two weeks.


A Free Learning Path

This course works on its own. It also fits with three other free courses:

Course What it teaches
Git and GitHub for Beginners Git and GitHub (12 sessions, this course)
JavaScript: Basics to Advanced The JavaScript language (25 sessions)
TypeScript: Basics to Advanced TypeScript (33 sessions)
Node.js Learning Path Servers, APIs and databases (30 sessions)

Learn Git first or alongside the others, and put every project you build in those courses on GitHub.


FAQ

Is it really free?
Yes. No signup, no paywall, no email list.

Are there videos?
No. Everything is written, with animated diagrams for the hard parts, so you can learn at your own pace.

Do I need to know programming?
No. Most sessions use simple text files. The final project uses a small Node.js app, and the code is given to you.

I already click the Git buttons in VS Code. Why learn the commands?
The commands work everywhere, most tutorials and teams use them, and they show what the buttons really do. When something goes wrong, the commands are how you fix it.

I found a mistake. What should I do?
Please open an issue on GitHub. Every report helps the next learner.


Thanks for Reading

If this course helps you, please give it a star on GitHub. It helps other beginners find it. And if you know someone who is just starting with Git, share it with them.

What was the most confusing part of Git when you started? Tell me in the comments.

Start with Session 01: What Are Git and GitHub?


Author: Mohin Sheikh. Follow me on GitHub for more free courses.

Top comments (0)