applied · Level 2

Git for AI builders: commits, branches and pull requests

Track and share your work with Git, review every change before it lands, and keep AI-written code and secrets under control.

By Mickarle Wagstaff-Irons - Micky Irons

  • Level 2Getting going
  • 125 min
  • 6 chapters
  • Online course and PDF workbook
The Assemblyapplied / 02

Read, practise and review

Your next step

Start this course online

Register your start, then work through the lessons and exercises at your own pace. You can download the PDF separately. Where a scored exam is available, you will find it after the lessons.

Register or resume your course

Mickai privately records this registration and sends its team a course-start notification. It records your intention to start, not proof of attendance or completion. Our course-start privacy notice explains the details and the 30-day resume cookie.

Follow the Mickai company page on LinkedIn

You can start learning without subscribing or following. Newsletter email confirmation and provider enrolment are recorded separately.

Start with the essentials

The short answer

Git is free version control software that records a project as a history of snapshots called commits. Work in small steps: read each change with git diff, stage what you mean with git add and commit it with a clear message. Use branches for experiments and merge them back, undo with git restore or git revert, keep secrets out, and share branches for review before they join main.

What you will learn

  • You will be able to create a repository, stage changes and make small commits with clear messages.
  • You will be able to read a diff and review every change, including AI-written ones, before you commit it.
  • You will be able to create branches, merge them and resolve a merge conflict.
  • You will be able to undo mistakes with git stash, git restore and git revert, and know which commands can lose work.
  • You will be able to keep secrets out of your history, and know what to do first if one gets in.
  • You will be able to share work through a remote and review a branch the way a pull request works.

Who it is for

Anyone who writes code, or builds with an AI assistant, and wants a safe record of their work: hobbyists, students, analysts and new developers. You should be able to open a terminal and type a command. No earlier Git experience is needed.

Before you start

  • Basic terminal use: opening a terminal, changing folder with cd and running a command. No programming or Git experience is needed.

Learn in your browser · Chapter 01 of 06

01

Git in plain words, and your first commit

Git records a history of your project that you can read, compare and rewind. Install it and make your first commit.

Git is free version control software. It records a project folder as a series of snapshots called commits, each with a message, an author and a time, and the folder plus its history is a repository. Hosting services keep copies online and add team features, but Git runs on your computer and needs none of them.

Install Git using the current instructions on git-scm.com. Windows: install Git for Windows and use its Git Bash terminal, so every command here works exactly as on macOS and Linux (PowerShell can save files written with echo in another text encoding, changing what Git shows). macOS: typing git --version in Terminal offers to install Apple's Command Line Tools if Git is missing. Linux: use your package manager.

A line starting $ is what you type (without the $); the lines under it are the reply. Tested with Git 2.54.0 in Git Bash on Windows 11. Your IDs, dates and paths will differ. In your terminal, git log also shows labels such as (HEAD -> main), and git push and git fetch add progress lines.

text · 2 lines
$ git --version
git version 2.54.0.windows.1

Make a practice folder containing a repository. -b main names the first branch main; Git's documentation says its default is currently master.

bash · 5 lines
mkdir git-practice
cd git-practice
mkdir prompt-library
cd prompt-library
git init -b main

Git replies Initialized empty Git repository in and the path. Now tell Git who you are; without --global, this applies to this repository only.

bash · 2 lines
git config user.name "Example Learner"
git config user.email "learner@example.invalid"

Create two files. > writes a file, replacing what was there, and >> adds a line to the end.

bash · 2 lines
echo "# Prompt library" > README.md
echo "Summarise this text in three bullet points." > prompts.txt

text · 11 lines
$ git status
On branch main

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	README.md
	prompts.txt

nothing added to commit but untracked files present (use "git add" to track)

Untracked means Git can see the files but is not recording them. git add chooses what goes into the next commit, and git commit records it.

text · 8 lines
$ git add README.md prompts.txt
$ git commit -m "Add README and first prompt"
[main (root-commit) 274c0c0] Add README and first prompt
 2 files changed, 2 insertions(+)
 create mode 100644 README.md
 create mode 100644 prompts.txt
$ git log --oneline
274c0c0 Add README and first prompt

git log lists commits newest first; 274c0c0 starts the commit's ID. Always give -m a message, or Git opens a text editor to ask for one (if it does, write a message, save and close it; in vi or Vim, the usual default, press Esc, type :q! and press Enter to cancel the commit). On Windows, Git may warn that LF will be replaced by CRLF: Git is adjusting invisible line endings, which is harmless here.

Try it yourself · Activity 01

15 min

Make your second commit

Follow a change through Git, predicting each reply first.

  1. Run echo "Explain this error message in plain English." >> prompts.txt.
  2. Predict, then run, git status --short.
  3. Run git add prompts.txt, then git status --short again.
  4. Commit with the message Add error-explainer prompt, then run git log --oneline.

Why choose what goes into each commit rather than take everything?

Worked answer

First M prompts.txt: M in the second column means changed, not staged. After git add, M prompts.txt: the M in the first column means staged. The commit reports 1 file changed, 1 insertion(+) and the log shows two commits, newest first.

Next chapter

Learn in your browser · Chapter 02 of 06

02

Read every change before you commit it

A diff shows exactly what changed. Reading one before every commit keeps AI-written changes under your control.

Git holds work in three places: the working tree (files you edit), the staging area or index (what the next commit will contain) and the commits. These commands only look:

Scroll sideways to see every column.

Read every change before you commit it · Table 1
CommandShows
git statusFiles that are changed, staged or untracked
git diffChanges not yet staged, line by line
git diff --stagedWhat the next commit will contain
git log --onelineCommits so far, newest first

Suppose a chat assistant adds the prompt you asked for but also edits your README unasked. Simulate it and read the diff:

bash · 2 lines
echo "Suggest three test cases for this function." >> prompts.txt
echo "# Prompt library (generated)" > README.md

text · 16 lines
$ git diff
diff --git a/README.md b/README.md
index 7583c3b..845bdb4 100644
--- a/README.md
+++ b/README.md
@@ -1 +1 @@
-# Prompt library
+# Prompt library (generated)
diff --git a/prompts.txt b/prompts.txt
index 011add3..c40a787 100644
--- a/prompts.txt
+++ b/prompts.txt
@@ -1,2 +1,3 @@
 Summarise this text in three bullet points.
 Explain this error message in plain English.
+Suggest three test cases for this function.

Lines starting - were removed, + added, and a space means unchanged context; @@ gives line numbers. Stage only what you wanted, and git diff --staged then shows just prompts.txt:

bash · 2 lines
git add prompts.txt
git diff --staged

Git's documentation suggests a summary of at most 50 characters, and Pro Git says to write it as a command ("Fix bug", not "Fixed bug"). A second -m adds a body.

text · 3 lines
$ git commit -m "Add test-case prompt" -m "Suggested by a chat assistant and checked by me. Left out its README edit."
[main 9083e5d] Add test-case prompt
 1 file changed, 1 insertion(+)

Then discard the README edit: git restore puts a file back to its last staged or committed version, throwing the edit away for good (chapter 4 has gentler options). Empty git status --short output means all is committed.

bash · 2 lines
git restore README.md
git status --short

Try it yourself · Activity 02

15 min

Split an over-eager change

An assistant made two unrelated changes. Commit them separately.

  1. Run echo "Rewrite this email to sound friendlier." >> prompts.txt and echo "Idea: add prompts for meeting notes" > ideas.txt.
  2. Run git status --short and git diff. Which file is missing from the diff?
  3. Add and commit each file separately with clear messages, then run git log --oneline.

What would a reviewer lose if both shared one commit?

Worked answer

Status: M prompts.txt and ?? ideas.txt. The diff shows only prompts.txt: git diff compares against the staging area, and ideas.txt is untracked. With messages such as Add friendlier-email prompt and Start an ideas list, the log lists five commits.

Next chapter

Learn in your browser · Chapter 03 of 06

03

Branches, merges and conflicts

A branch lets you try something without touching the main line. Merging brings it back, and sometimes Git asks you to decide.

A branch is a movable label on a commit. git switch -c name creates one and moves you onto it, so new commits move only that label. Merging brings another branch's commits into yours.

bash · 5 lines
git switch -c add-review-prompt
echo "Review this code and list any bugs you find." >> prompts.txt
git add prompts.txt
git commit -m "Add code-review prompt"
git switch main

text · 5 lines
$ git merge add-review-prompt
Updating 7802b20..f729928
Fast-forward
 prompts.txt | 1 +
 1 file changed, 1 insertion(+)

Fast-forward: main had not moved, so Git just moved its label forward. When both branches change the same lines, Git reports a merge conflict. Make one:

bash · 8 lines
git switch -c team-title
echo "# Prompt library for the team" > README.md
git add README.md
git commit -m "Retitle README for the team"
git switch main
echo "# Shared prompt library" > README.md
git add README.md
git commit -m "Retitle README as shared"

text · 10 lines
$ git merge team-title
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
Automatic merge failed; fix conflicts and then commit the result.
$ cat README.md
<<<<<<< HEAD
# Shared prompt library
=======
# Prompt library for the team
>>>>>>> team-title

Nothing is broken. Above ======= is your side (HEAD, your current branch); below is the incoming branch. Edit the file into what you want and remove the markers (Git will commit them if you forget), then add and commit:

bash · 2 lines
echo "# Shared prompt library for the team" > README.md
git add README.md

text · 10 lines
$ git commit -m "Merge team-title, combining both titles"
[main 1cd57f3] Merge team-title, combining both titles
$ git log --oneline --graph -5
*   1cd57f3 Merge team-title, combining both titles
|\  
| * 6a0e7d4 Retitle README for the team
* | 122d000 Retitle README as shared
|/  
* f729928 Add code-review prompt
* 7802b20 Start an ideas list

The graph shows the branches rejoining. To back out instead, git merge --abort tries to restore the pre-merge state; Git's documentation advises committing or stashing your own changes before merging, as an abort cannot always rebuild them.

Try it yourself · Activity 03

20 min

Cause, abandon and fix a conflict

Make two branches disagree, back out once, then resolve.

  1. Run git switch -c ideas-a and echo "Idea: code review" > ideas.txt, then add and commit (Change idea to code review).
  2. Run git switch main and echo "Idea: study notes" > ideas.txt, then add and commit (Change idea to study notes).
  3. Run git merge ideas-a, then git merge --abort, then git status --short and cat ideas.txt.
  4. Merge again, keep both with printf "Idea: study notes\nIdea: code review\n" > ideas.txt, then add and commit (Merge ideas-a, keeping both ideas).

When is backing out wiser than resolving?

Worked answer

Both merges report CONFLICT (content): Merge conflict in ideas.txt. After the abort, the status is empty and ideas.txt holds only the study-notes idea. After resolving, cat ideas.txt shows both ideas and git status ends nothing to commit, working tree clean.

Next chapter

Learn in your browser · Chapter 04 of 06

04

Undo safely when an assistant rewrote too much

Git gives you several ways back. Use the gentlest one that works, and know which commands lose work for good.

An editor assistant asked to tidy one prompt may rewrite the whole file. Check a change's size first:

text · 4 lines
$ echo "You are a helpful assistant." > prompts.txt
$ git diff --stat
 prompts.txt | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Five lines removed for one added is a warning sign. Unsure? Stash it: git stash saves uncommitted changes to tracked files and resets them to the last commit.

text · 4 lines
$ git stash push -m "Assistant rewrite of prompts"
Saved working directory and index state On main: Assistant rewrite of prompts
$ git stash list
stash@{0}: On main: Assistant rewrite of prompts

Your prompts are back; git stash drop would delete the saved attempt. Untracked files are not stashed by default. The ladder, gentlest first:

Scroll sideways to see every column.

Undo safely when an assistant rewrote too much · Table 2
SituationCommandRecoverable?
Unsure about uncommitted changesgit stash push -m "note"Yes, kept in the stash list
A file staged by mistakegit restore --staged fileYes, your edits stay
Unwanted uncommitted editsgit restore fileNo, Pro Git calls it dangerous
A bad commitgit revert --no-edit commitYes, both commits stay in history

git revert safely undoes a commit, even a shared one, by adding history rather than removing it. HEAD is your current commit; --no-edit skips the editor.

text · 13 lines
$ echo "Do whatever you think is best." >> prompts.txt
$ git add prompts.txt
$ git commit -m "Add open-ended prompt"
[main 3e90e5d] Add open-ended prompt
 1 file changed, 1 insertion(+)
$ git revert --no-edit HEAD
[main a045f45] Revert "Add open-ended prompt"
 Date: Sat Sep 26 09:24:54 2026 +0100
 1 file changed, 1 deletion(-)
$ git log --oneline -3
a045f45 Revert "Add open-ended prompt"
3e90e5d Add open-ended prompt
e2d9c68 Merge ideas-a, keeping both ideas

Try it yourself · Activity 04

15 min

Practise the undo ladder

Inspect the stash, then undo a staged mistake in two steps.

  1. Run git stash show -p.
  2. Run echo "Idea: delete everything" > ideas.txt and git add ideas.txt.
  3. Run git restore --staged ideas.txt, then git status --short.
  4. Run git restore ideas.txt, git status --short and cat ideas.txt.

Which step could not be undone, and why was that acceptable?

Worked answer

The stash diff removes five lines and adds You are a helpful assistant.. Staged, the status is M ideas.txt; after restore --staged it is M ideas.txt, still edited. git restore then clears the status and both ideas are back. Only that last step discarded work: an edit you wanted gone.

Next chapter

Learn in your browser · Chapter 05 of 06

05

Keep secrets out of your history

A secret committed once stays in the history after you delete the file. Prevention is cheap; cleaning up is not.

An API key is a password that lets a program use a private or paid service. Assistants can write keys into code or settings files, which are easy to commit by accident. Try a fake one (never a real one):

bash · 5 lines
echo "API_KEY=example-not-a-real-key" > .env
git add .env
git commit -m "Add settings"
git rm .env
git commit -m "Remove settings file"

The file has gone from the folder but not from the history. HEAD~1:.env means the file as it was one commit back:

text · 5 lines
$ git log --oneline -- .env
fcf18e3 Remove settings file
80dbc15 Add settings
$ git show HEAD~1:.env
API_KEY=example-not-a-real-key

Deleting only added a snapshot without the file; the earlier one still has it, and every clone and push carries the whole history. Treat a committed secret as leaked:

  1. Revoke or rotate it first, with the service that issued it. OWASP and GitHub put this first; GitHub notes it may be enough.
  2. Find out where the history has been pushed or cloned.
  3. Only then consider rewriting history. It is a specialist job needing force pushes, and GitHub warns it cannot remove the data from other people's clones.

Prevention. A .gitignore file lists files that Git should not track:

bash · 2 lines
echo ".env" > .gitignore
echo "API_KEY=example-new-key" > .env

text · 9 lines
$ git status --short
?? .gitignore
$ git check-ignore -v .env
.gitignore:1:.env	.env
$ git add .gitignore
$ git commit -m "Ignore local .env settings files"
[main cee7b13] Ignore local .env settings files
 1 file changed, 1 insertion(+)
 create mode 100644 .gitignore

.env has left the status, and check-ignore -v names the rule hiding it. But .gitignore does not affect files already tracked (git rm --cached file stops tracking one but keeps your copy), or keys pasted into code, so also:

  • Keep real secrets out of the repository; the UK's National Cyber Security Centre advises separating credentials from source code.
  • Check git diff --staged for keys, tokens and passwords before committing.
  • Never paste a real key into an AI assistant.
  • Treat a hosting service's secret scanning as a safety net, not a plan.

Try it yourself · Activity 05

10 min

Search the history for a leak

Find where the secret appeared, then test the ignore rule.

  1. Run git log --oneline -S "API_KEY", which lists commits adding or removing that text.
  2. Run git status --short --ignored.
  3. Try git add .env.

If the key were real and pushed, what would you do first?

Worked answer

-S lists Remove settings file and Add settings. The ignored listing shows !! .env. git add .env refuses because the path is ignored, hinting that -f would force it: do not. First revoke or rotate the key, because copies of the history may exist that a rewrite cannot reach.

Next chapter

Learn in your browser · Chapter 06 of 06

06

Share work and review it like a pull request

A remote is another copy of the repository that people push to and fetch from. Here a local folder plays the hosting service, so nothing leaves your computer.

Small teams often share one central repository. Each person pushes a branch and asks for review before it is merged into main: a pull request (some services say merge request). It shows the branch's diff; reviewers comment, request changes or approve, and automated checks can run.

A bare repository has history but no working files, as on a server. Create one, connect it as origin and push (upload) main; git init prints a path again.

bash · 4 lines
cd ..
git init --bare -b main shared.git
cd prompt-library
git remote add origin ../shared.git

text · 4 lines
$ git push -u origin main
To ../shared.git
 * [new branch]      main -> main
branch 'main' set up to track 'origin/main'.

Now be the collaborator: clone the shared copy and give it its own invented identity.

text · 10 lines
$ cd ..
$ git clone shared.git collaborator
Cloning into 'collaborator'...
done.
$ cd collaborator
$ git config user.name "Example Collaborator"
$ git config user.email "collaborator@example.invalid"
$ git log --oneline -- .env
fcf18e3 Remove settings file
80dbc15 Add settings

The fake key from chapter 5 came too. The collaborator pushes a branch (Git reports [new branch]):

bash · 5 lines
git switch -c add-translate-prompt
echo "Translate this paragraph into plain English." >> prompts.txt
git add prompts.txt
git commit -m "Add translation prompt"
git push -u origin add-translate-prompt

Back in your copy, review it. git fetch downloads without changing your files, and the three-dot git diff shows what the branch changed since it split from main, as a pull request page does:

text · 14 lines
$ cd ../prompt-library
$ git fetch origin
From ../shared
 * [new branch]      add-translate-prompt -> origin/add-translate-prompt
$ git diff main...origin/add-translate-prompt
diff --git a/prompts.txt b/prompts.txt
index fc19b0e..330d0a1 100644
--- a/prompts.txt
+++ b/prompts.txt
@@ -3,3 +3,4 @@ Explain this error message in plain English.
 Suggest three test cases for this function.
 Rewrite this email to sound friendlier.
 Review this code and list any bugs you find.
+Translate this paragraph into plain English.

Describe changes so they can be checked:

  • What changed, and why.
  • How you checked it: commands run, results seen.
  • What an assistant wrote and what you reviewed; follow any team policy on AI-assisted work.
  • What is risky, unfinished or left out.

Review like a sceptic: read the diff, not just the description, and keep requests small. The UK's National Cyber Security Centre advises reviewing all code before merging, noting that attacks can be subtle or disguised.

Try it yourself · Activity 06

25 min

Ask for a change, then approve it

You ask for translations to be kept short. The collaborator updates the branch; you re-review and merge.

  1. Run cd ../collaborator and echo "Keep the translation under 100 words." >> prompts.txt, then add, commit (Limit translation length) and git push.
  2. Run cd ../prompt-library, git fetch origin, then the same three-dot git diff as above.
  3. Approve: git merge origin/add-translate-prompt, then git push origin main.
  4. Run cd ../collaborator, git switch main, git pull and tail -n 3 prompts.txt.

What would you write in the pull request description?

Worked answer

The diff now adds both lines at the end of prompts.txt. The merge is a fast-forward (2 insertions(+)) and the push reports main -> main. git pull fast-forwards the collaborator's main, and tail shows the review prompt, the translation prompt and the limit.

Assessment options

Keep learning

The complete workbook

This workbook takes you from your first commit to reviewing a colleague's branch the way a pull request works, all on your own computer. You will read diffs, commit in small steps, merge branches and resolve a conflict, undo mistakes safely and see why a deleted secret is still in the history. Throughout, you practise the habits that keep AI-written changes under your control.

  1. 01
    Git in plain words, and your first commit

    Git records a history of your project that you can read, compare and rewind. Install it and make your first commit.

    Read here · 1 exercise
  2. 02
    Read every change before you commit it

    A diff shows exactly what changed. Reading one before every commit keeps AI-written changes under your control.

    Read here · 1 exercise
  3. 03
    Branches, merges and conflicts

    A branch lets you try something without touching the main line. Merging brings it back, and sometimes Git asks you to decide.

    Read here · 1 exercise
  4. 04
    Undo safely when an assistant rewrote too much

    Git gives you several ways back. Use the gentlest one that works, and know which commands lose work for good.

    Read here · 1 exercise
  5. 05
    Keep secrets out of your history

    A secret committed once stays in the history after you delete the file. Prevention is cheap; cleaning up is not.

    Read here · 1 exercise
  6. 06
    Share work and review it like a pull request

    A remote is another copy of the repository that people push to and fetch from. Here a local folder plays the hosting service, so nothing leaves your computer.

    Read here · 1 exercise

Also inside: a 9-point checklist, a glossary of 12 terms and 10 questions and answers to test yourself. 6 hands-on exercises, each with a worked answer at the back where the workbook gives one.

The PDF is free. We ask for your name and email before downloading. Read the privacy notice at the download form. Free to download and use for personal learning, study groups and inside your own team. Please do not resell the workbooks or republish them as your own. Link people to trust-agent.ai instead.

Get your free PDF workbook

Enter your name and email, then download the complete workbook. This form also works without JavaScript.

We privately record your name, email and request IP for this download. Read our privacy notice and retention policy.

Visit Mickai on LinkedIn

Newsletter confirmation does not affect your download. Following Mickai on LinkedIn is optional; this site does not verify followers.

Test yourself

Questions and answers

What is the difference between Git and GitHub?

Git is the version control software that runs on your computer. Hosting services, such as GitHub and GitLab, store Git repositories online and add features such as pull requests, reviews and automated checks. You can use Git fully without any hosting service, as this workbook does.

Do I need an account on a hosting service for this workbook?

No. Chapter 6 uses a bare repository in a folder on your computer as the shared copy, so you can practise pushing, fetching and reviewing without an account and without sending anything over the internet.

Which terminal should I use on Windows?

Git Bash, which comes with Git for Windows. It behaves like the macOS and Linux terminals, so every command in this workbook is the same. Other shells run the git commands too, but they may save files written with echo differently, which changes what Git shows.

What name and email should I give Git?

Ones you are happy to publish, because every commit records them and anyone who can see the repository can read them. Changing them later does not change earlier commits. Some hosting services offer a private no-reply address for this. In practice repositories, an invented identity is fine.

How often should I commit?

Whenever you finish one logical change. Small commits are easier to review, describe and undo. If an assistant made several unrelated changes, stage and commit them separately, and discard the ones you did not want.

I got a merge conflict. Have I broken something?

No. Git has paused the merge because both branches changed the same lines. Edit the file into the version you want, remove the marker lines, then add and commit it. If you would rather stop, git merge --abort tries to return you to where you were before the merge.

What is the difference between restore, revert and reset?

git restore puts files back from the staging area or a commit and does not change the history. git revert adds a new commit that undoes an earlier one, so it is safe on shared branches. git reset moves the branch itself and, with --hard, overwrites your files. Prefer restore and revert.

I committed a password or API key. What should I do?

Treat it as leaked. First revoke or rotate it with the service that issued it, then find out where the history has been pushed or cloned. Deleting the file in a new commit does not remove it from earlier snapshots, and rewriting history is a specialist job that cannot reach copies already made.

Is it safe to commit code that an AI assistant wrote?

Only after you have read it. Check git diff for changes you did not ask for, for secrets, and for anything that deletes or sends data. Commit in small pieces, say in the message what the assistant did and what you checked, and follow any policy your team has on AI-assisted work.

Why are my commit IDs different from the ones in this workbook?

A commit's ID is a checksum of its contents, which include the author's name and email and the time it was made. Your name, email and times differ, so your IDs will too. The messages, files and diffs should match.

Write as you go

My notes

Use this scratchpad for your own notes, working or answers as you read. Notes are saved in this browser on this device. Downloading makes a local copy; it does not send your notes to Mickai.

Consolidate your learning

Review your work

Work through the exercises and questions, then compare your reasoning with the worked answers. A scored exam and verifiable certificate are not yet available for this course.

Review the questions

Learn the language

Key terms

Repository
A project folder together with its full history, which Git keeps in a hidden .git folder.
Commit
A saved snapshot of the project with a message, an author and a time, identified by a checksum.
Working tree
The files you can see and edit in the project folder.
Staging area
Also called the index: the changes that will go into the next commit, chosen with git add.
Diff
A line-by-line comparison of two versions, with - for removed lines and + for added ones.
Branch
A movable label on a commit that lets you work on something without changing main.

6 of the workbook's 12 terms. The complete glossary is in the workbook.

Follow the evidence

Sources and checks

Facts last checked: .

Examples in this workbook were run on: Git 2.54.0.windows.1 in Git Bash (GNU bash 5.3.9) on Windows 11 Pro 10.0.26200, with an empty global Git configuration; re-run by the checker with no global or system configuration, both captured and in a pseudo-terminal, and again with core.autocrlf=true; chapter 1 also tried in Windows PowerShell 5.1.26100.9549 (2026-09-26).

These workbooks use AI assistance. See how the workbooks are made.

  1. Pro Git 1.1: About Version ControlPro Git, 2nd edition (git-scm.com)
  2. Pro Git 1.3: What is Git?Pro Git, 2nd edition (git-scm.com)
  3. Pro Git 1.5: Installing GitPro Git, 2nd edition (git-scm.com)
  4. Pro Git 1.6: First-Time Git SetupPro Git, 2nd edition (git-scm.com)
  5. Pro Git 2.2: Recording Changes to the RepositoryPro Git, 2nd edition (git-scm.com)
  6. Pro Git 2.4: Undoing ThingsPro Git, 2nd edition (git-scm.com)
  7. Pro Git 2.5: Working with RemotesPro Git, 2nd edition (git-scm.com)
  8. Pro Git 3.1: Branches in a NutshellPro Git, 2nd edition (git-scm.com)
  9. Pro Git 3.2: Basic Branching and MergingPro Git, 2nd edition (git-scm.com)
  10. Pro Git 4.2: Getting Git on a Server (bare repositories)Pro Git, 2nd edition (git-scm.com)
  11. Pro Git 5.2: Contributing to a Project (commit guidelines)Pro Git, 2nd edition (git-scm.com)
  12. Pro Git 7.3: Stashing and CleaningPro Git, 2nd edition (git-scm.com)
  13. Pro Git 10.2: Git ObjectsPro Git, 2nd edition (git-scm.com)
  14. Git home page (free and open source)Git project (git-scm.com)
  15. Install Git on WindowsGit project (git-scm.com)
  16. Install Git on macOSGit project (git-scm.com)
  17. Install Git on LinuxGit project (git-scm.com)
  18. Git for Windows (Git BASH)Git for Windows project
  19. about_Character_Encoding (redirection in Windows PowerShell 5.1)Microsoft Learn
  20. git-init referenceGit project (git-scm.com)
  21. git-config referenceGit project (git-scm.com)
  22. git-status reference (short format)Git project (git-scm.com)
  23. git-diff referenceGit project (git-scm.com)
  24. git-commit reference (commit message discussion)Git project (git-scm.com)
  25. git-log reference (-S)Git project (git-scm.com)
  26. git-switch referenceGit project (git-scm.com)
  27. git-merge reference (fast-forward, conflicts, --abort)Git project (git-scm.com)
  28. git-restore referenceGit project (git-scm.com)
  29. git-stash referenceGit project (git-scm.com)
  30. git-revert referenceGit project (git-scm.com)
  31. git-reset reference (--hard)Git project (git-scm.com)
  32. git-push reference (--force)Git project (git-scm.com)
  33. git-pull referenceGit project (git-scm.com)
  34. gitignore referenceGit project (git-scm.com)
  35. git-check-ignore referenceGit project (git-scm.com)
  36. gitrevisions reference (ranges and revision names)Git project (git-scm.com)
  37. git-var reference (default editor)Git project (git-scm.com)
  38. Pull requestsGitHub Docs
  39. Pull request reviewsGitHub Docs
  40. Merge requestsGitLab Docs
  41. Setting your commit email addressGitHub Docs
  42. Removing sensitive data from a repositoryGitHub Docs
  43. Secret scanningGitHub Docs
  44. Push protectionGitHub Docs
  45. Secret detectionGitLab Docs
  46. Secrets Management Cheat SheetOWASP Cheat Sheet Series
  47. Secure development and deployment guidance: Protect your code repositoryNational Cyber Security Centre (UK)

Created by Mickarle Wagstaff-Irons - Micky Irons with the Mickai team. Published by Mickai LTD. Last updated 26 September 2026.

NextKeep going

Where to go next