Git — Simply ExplainedHave you ever broken something that worked yesterday and then searched through folders named “final,” “final-final,” and “use-this-version”? Git replaces that confusion with a clear, traceable history of your project.In this episode of M365 FM, Mirko Peters explains Git in plain English. You will learn how commits create meaningful checkpoints, how the working directory and staging area fit together, why developers use branches, how merges and conflicts work, and where GitHub enters the workflow.

WHY GIT EXISTS
Git is a version control system that records the history of a project. Instead of duplicating an entire folder whenever something works, Git allows you to create deliberate checkpoints that can be reviewed and compared later.If a new change introduces a problem, Git can show which files and lines changed between versions. This makes investigating a broken application far easier than searching through old folders or attempting to reverse every edit manually.Git works especially well with code and other text-based files because it can identify small differences between versions. It can also track configuration files, documentation, website content, and many other project assets.

COMMITS CREATE MEANINGFUL CHECKPOINTS
A recorded checkpoint in Git is called a commit. Git does not create a commit every time you save a file. You decide when a completed piece of work deserves to become part of the project history.A commit might add a sign-in option, correct a password-reset link, or update important text. Each commit should contain one clear and related change.Useful commit messages explain what happened. A message such as “Fix password reset link” gives future developers meaningful context. Messages such as “Updates” or “Various changes” make the history much harder to understand when someone investigates a problem months later.Small, focused commits are easier to review, compare, and reverse without affecting unrelated work.

GIT WORKS LOCALLY FIRST
Git runs on your own computer. You can create commits, inspect changes, and use branches without an internet connection or an online hosting service.This local-first design is important because Git and GitHub are different technologies. Git tracks the project and its history, while GitHub provides an online location where people can share and review Git repositories.A developer can therefore use Git alone for a personal project. GitHub becomes valuable when that project needs to be shared with other people or accessed from different computers.

THE WORKING DIRECTORY
The working directory is the ordinary project folder on your computer. It contains the files you open, create, edit, and delete.Think of it as your desk. Work can be unfinished or messy there, and Git does not automatically force every modification into the permanent project history.The git status command shows what has changed since the last commit. It identifies modified, new, and deleted files and indicates which changes have already been prepared for the next checkpoint.For beginners and experienced developers alike, git status is one of the most useful Git safety checks.

THE STAGING AREA
The staging area sits between active work and recorded history. Think of it as a review tray where you place only the changes intended for the next commit.Suppose you fix a password-reset link while also beginning an unfinished redesign. The completed fix can be staged while the redesign remains in the working directory.The git add command places selected changes into the staging area. Despite its name, this command does not permanently record the work or send anything online. It prepares the selected version of a file for the next commit.This extra step gives developers precise control over which changes belong together.

THE LOCAL REPOSITORY
The local repository stores your commits and project history on your computer. Once the staging area contains the correct changes, git commit records them as one checkpoint.The basic local route is straightforward: edit files in the working directory, inspect the situation with git status, select the intended changes with git add, and record them with git commit.The working directory is where you work. The staging area is where you choose. The local repository is where Git records that choice.

BRANCHES CREATE SAFE LINES OF WORK
A commit provides a safe point in history, while a branch provides a separate place to develop what comes next.Most projects have a branch called main, representing the version the team currently trusts. Instead of placing incomplete work directly into main, developers create focused branches for individual features, improvements, or bug fixes.A branch begins from an existing commit and builds its own line of history. Developers can test ideas and create several commits without disturbing the trusted version of the project.Branches also allow several people to work simultaneously. One developer can repair a login proble...