Software Development free courses

Master the TrickFoundationFree

Git and GitHub Teamwork

Understand local commits, branches and pull-request review using a disposable practice repository.

3 reading lessons · about 30 min ·written by MTT

The idea

The working tree contains your current files, the staging area selects changes for the next commit and a commit records a snapshot in local history. Saving a file is not the same as committing it, and committing is not the same as pushing. Review git status and git diff before staging, then inspect the staged diff so unintended files or secrets do not enter history.

Worked example

In a disposable repository, edit a README and a notes file. Stage only the README. A commit then records the staged README change while the notes remain uncommitted. If a private token appears in a diff, stop and remove it from the change; committing and later deleting it would still leave it in history.

Try it

On paper or in a disposable repository, draw the working tree, staging area and local history. Trace editing two files, staging one and committing it. List the status and diff checks you would use before the commit. Explain why an ignored file is not a safe place for a secret already committed.

Lesson 1 of 3 · About 10 min

Understand the three local states

Check your understanding

Course quiz

Finish the course to unlock the quiz

Complete all 3 lessons and 5 questions open up here. You have 3 to go.

What you will learn

  • Distinguish working, staged and committed changes
  • Explain branches and remotes
  • Resolve a simple conflict and review a change

Before you start

Prerequisites
Basic file editing. Use a disposable repository without secrets or real customer data.
Cost
Free introductory reading lessons, exercises and quiz. Optional third-party tools, hosting or AI subscriptions may cost money.

Original introductory lessons and assessment by Master the Trick. Estimated times include the suggested exercises.