Git Fundamentals: Version Control
Track changes, undo mistakes and collaborate with Git. Understand the working tree, staging area and commits, use branches and merges, resolve conflicts and work with remote repositories.
What you will learn
- Explain the working tree, staging area and repository
- Record, inspect and undo changes safely
- Create, merge and clean up branches; resolve merge conflicts
- Clone, pull and push with remote repositories
Prerequisites
- Basic use of a terminal (cd, ls)
Learning path
1 Recording changes
2 Undoing and ignoring
3 Branches and merging
Practical project: Version a small website with a teammate workflow
- Create a repository for a small website (e.g. the page from the HTML course) and make an initial commit with a README.md and a .gitignore.
- Create the branch
about-page, add an about page in two separate, well-described commits, and merge it into main. - Provoke a conflict on purpose: on a new branch change the main heading; on main change the same heading differently; merge and resolve the conflict.
- Undo practice: make a bad commit and reverse it with
git revert. - Push the repository to a hosting service of your choice and verify with
git log --oneline --graph --allthat the history shows the branch and merge commits.
References
Related courses
HTML Fundamentals: Structure for the Web
Write correct, semantic and accessible HTML: document structure, text, links, images, lists, tables and forms. Learn why structure matters for…
Python Fundamentals
Learn to program with Python from scratch: values and variables, decisions, loops, lists, dictionaries, strings, functions and error handling. Every…
JavaScript Fundamentals
The language of the web, from the ground up: values, types and operators, control flow, functions and arrow functions, arrays with…