You will be able to
- Install Git and configure your name and email for commits
- Create a repository and record changes with add and commit
- Inspect project history and compare changes with log, status and diff
- Ignore unwanted files with a .gitignore file
- Undo and restore changes safely using restore and reset
- Create, switch and merge branches and resolve simple merge conflicts
Good to know first
- Basic comfort using a terminal or command line
- Ability to create and edit files in a text editor
- A GitHub account for the remote repository section
Syllabus
10 lessons and a final project
- 1
Introduction to Git and installing it Free
This lesson explains what a version control system is and why Git is a distributed one that is free, open source, fast and scalable. It also prepares you to install Git on your own computer.
- 2
Configuring Git and creating a repository Beyond Pass
You will tell Git who you are, then turn a folder into a Git repository with git init. You will learn why Git needs your name and email before it records any work.
1 code4 build steps2 exercises2 questions - 3
Staging files and making commits Beyond Pass
You will learn how to set up Git's global configuration (your name, email, editor and line-ending behaviour) and how to save snapshots of your work with git add and git commit. Along the way you will see how a commit message describes a change.
3 code4 build steps3 exercises3 questions - 4
Viewing history and comparing changes Beyond Pass
This lesson introduces the three areas of the Git workflow (working directory, staging area, repository) and shows how files move between them with git add and commit. It also starts the hands-on part by creating a file in a Git project so you can see Git track it.
- 5
Ignoring files with .gitignore Beyond Pass
You learn how to tell Git which files and folders to ignore, using a .gitignore file so they never get staged or committed by accident. The chapter also shows the first commit in the Moon project and a few tips on writing good commit messages.
1 code4 build steps2 exercises3 questions - 6
Undoing Changes with git restore and git reset Beyond Pass
You will learn how to throw away unwanted edits to files with git restore, and how git rm and git status help you handle deleted and renamed files. You will also see how a .gitignore file keeps junk files out of your commits.
6 code5 build steps1 exercise3 questions - 7
Working with branches: Unstaging and checking status Beyond Pass
This lesson covers how to remove files from Git's tracking and how to read short status output while you work on a project. It follows the video's examples of ls-files, git rm, and git status -s.
3 code4 build steps2 exercises3 questions - 8
Reviewing changes with git diff and git difftool Beyond Pass
This lesson shows how to look at what has changed in your files before you commit, using git diff and git status -s. It also shows how to set up VS Code as a visual diff tool with git difftool.
2 code6 build steps3 exercises3 questions - 9
Viewing Commits and Looking Inside the Repository (Git) Beyond Pass
This lesson shows how to inspect a past commit with git show and git log, and how to look at the files a commit stored with git ls-tree. You will learn to read the difference a commit made, and to use HEAD and HEAD~1 to point at commits.
1 code5 build steps3 exercises4 questions - 10
Restoring a Deleted File and Wrapping Up Git Beyond Pass
You learn how to bring back a file you deleted by restoring it from an earlier commit, using git restore with --source and HEAD~1. The chapter also recaps the core Git workflow and points you to where to go next.
1 code4 build steps3 exercises3 questions
Final project
Build and Rescue the Moon Project
Create a small project from scratch and manage it with Git the way the course shows. You will record history, ignore junk files, make and undo mistakes, and then use a branch with a merge conflict. This ties the whole workflow together.
Its 7 tasks open with Beyond Pass.
Free preview · Lesson 1 in full
Introduction to Git and installing it
This lesson explains what a version control system is and why Git is a distributed one that is free, open source, fast and scalable. It also prepares you to install Git on your own computer.
Draw and write next to the video.
On your scratchpad
Draw two boxes labelled 'Centralized' and 'Distributed'. In the centralized box, draw one central server with several developers connecting to it. In the distributed box, draw each developer with their own full copy of the repository, and a
Lessons 2–10 and the final project
They open with Beyond Pass: every lesson of every course, in full. One payment: $14.99 for 90 days or $29 for a year. No subscription.
Made by Beyond from the video “Git Tutorial for Beginners: Learn Git in 1 Hour” by Programming with Mosh. The video plays in YouTube's own player. Watch it on YouTube · All lessons
