Tokenova Learn

Office-Ready Git · provided by Tokenova

Git glossary

Every Git word used in this course, in plain English.

Open the interactive version

A

Alias

A short name for a longer Git command, saved in your config. git lg is the course's alias for git log --oneline --graph --decorate --all.

Day 3

Amend

git commit --amend: replaces your last commit with a new one that keeps its changes, adds anything you've staged since, and takes a new message. The new commit gets a new id.

Day 3

Annotated tag

A tag stored as its own object, with the tagger's name, a date and a message. Made with git tag -a; the right kind for releases.

Day 13

B

Base branch

The branch a pull request wants to merge into, usually main.

Day 8

Bisect

git bisect: a binary search through history. Each good or bad verdict rules out half of the suspect commits.

Bonus B2

Blame

git blame <file>: shows, for every line, the commit, author and date that last changed it.

Day 3

Blob

The object that stores one file's contents, without its name.

Bonus B6

Branch

A movable label that points at one commit. Committing moves the label you're on to the new commit.

Day 4

C

Check

An automatic test run on a pull request (for example by GitHub Actions), shown as a green tick or a red cross.

Day 8

Cherry-pick

Copy one commit onto the branch you're on: the same change with a new id.

Day 11

Clean filter

A program Git runs on a file when you git add it, changing what gets committed but not your copy on disk. nbstripout is one: it strips notebook outputs.

Day 12

Clone

Download a complete copy of a repository, with its whole history, and link it to the original as origin.

Day 6

Closing keyword

A word such as Closes, Fixes or Resolves before an issue number in a PR description. The issue closes when the PR merges into the default branch.

Day 9

Code review

Reading a teammate's pull request and commenting before it merges: to catch mistakes and share knowledge.

Day 9

CODEOWNERS

A file that names who owns which paths. GitHub requests their review automatically on pull requests that touch those paths.

Day 9

Commit

A saved snapshot of the whole project, with a message, an author and a date. Made with git commit from whatever is staged.

Day 2

Commit ID (SHA)

The 40-character fingerprint of a commit, usually shortened to 7 (a1b2c3d). Change anything in a commit and its ID changes.

Compare branch

The branch with your changes that a pull request proposes to merge (GitHub also calls it the head branch).

Day 8

Conflict markers

The <<<<<<<, ======= and >>>>>>> lines Git writes into a conflicted file to show both versions.

Day 5

CRLF and LF

The invisible characters that end a line: CRLF on Windows, LF on macOS and Linux. Mixing them makes every line look changed.

Day 12

D

Detached HEAD

HEAD points straight at a commit instead of a branch. Fine for looking around; put a branch on any commit you make there.

Day 4

Draft pull request

A pull request marked as not ready: people can look and comment, but it can't be merged until you click Ready for review.

Day 8

E

Execution count

The number a notebook stores for each code cell (In [7]), which changes every time you run it. It makes notebook diffs noisy.

Day 12

Exit code

The number a program returns when it ends: 0 means success, anything else means failure. git bisect run reads it.

Bonus B2

F

Fast-forward

A merge where your branch label simply moves forward to the other branch's tip, because your branch had no new commits. No merge commit is made.

Day 5

Fetch

Download new commits from the remote and update the origin/... bookmarks, without touching your files or branches.

Day 6

First bad commit

The earliest commit where the problem appears. Its parent is still good.

Bonus B2

Fixup commit

A commit made with git commit --fixup <id>. Its message starts with fixup!, so --autosquash knows where to fold it in.

Bonus B1

Force push

A push that replaces GitHub's branch even though your branch no longer contains its commits. Needed after a rebase or amend of pushed commits.

Day 10

Force-with-lease

A force push that goes ahead only if GitHub's branch is still where your last fetch saw it. Otherwise it refuses with (stale info).

Day 10

Fork

Your own copy of someone else's repository on GitHub. You push there and open pull requests to the original.

Bonus B3

G

Git

The version-control tool on your computer. It records snapshots of your project and works fully offline.

Git Bash

The Linux-style terminal that comes with Git for Windows. Open it from the Start menu, not by typing bash in PowerShell.

Day 1

git clean

Deletes untracked files (and folders with -d). Preview with -n first: there's no Recycle Bin.

Day 11

Git Credential Manager

The helper installed with Git for Windows that signs you in to GitHub through your browser and remembers the login securely.

Git Flow

A branching strategy with long-lived main and develop branches, plus feature, release and hotfix branches, for scheduled releases.

Day 13

Git LFS

Git Large File Storage: an add-on that commits a small pointer file and keeps the big file itself in separate storage on GitHub, with its own quota.

Day 12

.gitattributes

A file in the repo that sets per-path rules for Git, such as line endings (* text=auto), binary files, or LFS tracking. It's shared with everyone who clones.

Day 12

GitHub

A website that hosts copies of Git repositories and adds teamwork: pull requests, reviews, issues and Actions (automated checks).

GitHub CLI

gh, GitHub's official command-line tool for pull requests, issues, Actions runs and more. Git itself doesn't need it.

Bonus B5

GitHub Flow

A branching strategy with one long-lived main and short-lived branches merged through pull requests.

Day 13

github.dev

VS Code in the browser. Press . on a GitHub repo page to open it. Handy for reading and small edits; it can't run code.

Day 7

.gitignore

A file listing patterns of files Git must never pick up, such as .env or data/*.csv. It only affects untracked files.

Day 2

Global config

Your own Git settings for every repository, in C:\Users\<you>\.gitconfig. git config --global writes here, and it beats the system file.

Day 1

Golden rule of rebasing

Don't rebase commits that other people already have. Rebase your own unshared work; merge on shared branches.

Day 10

H

HEAD

Git's name for the commit you're on right now, usually the newest commit of your current branch. HEAD~1 is its parent, HEAD~2 the one before that.

Day 3

Hook

A script in .git\hooks that Git runs at a set moment, such as before a commit (pre-commit) or before a push (pre-push).

Bonus B4

Hotfix

An urgent fix to a released version, usually made on a branch that starts at the release tag (for example hotfix/1.0.1 from v1.0.0).

Day 13

I

Interactive rebase

git rebase -i: replay your branch's commits after you edit a todo list, to squash, reword, reorder or drop them.

Bonus B1

Issue

A numbered to-do on GitHub (bug, request or question). Issues and pull requests share one number sequence.

Day 9

L

Lightweight tag

A tag that is only a name pointing at a commit, with no message or tagger. Made with plain git tag <name>.

Day 13

Local config

Settings for one repository only, in its .git\config file. It beats both global and system.

Day 1

M

Merge

Combine the work from another branch into the branch you're on.

Day 5

Merge base

The most recent commit that two branches share. Git compares both tips against it to work out what each side changed.

Day 5

Merge commit

A commit with two parents that joins two lines of work.

Day 5

Merge conflict

When both branches changed the same lines, Git pauses the merge and asks you to choose the final content.

Day 5

N

Noreply email

A private address GitHub gives you (…@users.noreply.github.com) to use as user.email, so your real email stays out of public commits.

Day 7

O

Object

One item in Git's database (.git\objects), named by the fingerprint of its content: a blob, tree, commit or annotated tag.

Bonus B6

ORIG_HEAD

Where Git parks the old branch tip before a rebase, reset or merge. git reset --hard ORIG_HEAD undoes the last one.

Bonus B1

origin

The default name Git gives the remote you cloned from. At work it's the repository on GitHub.

Day 6

P

Packfile

One compressed file in .git\objects\pack that holds many objects, storing similar versions as differences.

Bonus B6

Pager

The one-screen-at-a-time viewer Git uses for long output. Scroll with the arrow keys or Space; press q to quit.

Day 1

Parent

The commit that came just before another one. Every commit stores its parent's id, which links commits into a chain (a merge commit has two parents).

Day 3

Personal access token (PAT)

A password-like string GitHub creates for scripts and tools. Treat it like a password: never commit it.

Pickaxe

git log -S "text": finds the commits where that text was added or removed.

Day 3

pre-commit (framework)

A Python tool that installs shared hooks listed in a committed .pre-commit-config.yaml file.

Bonus B4

Protected branch

A branch with rules GitHub enforces, such as requiring a pull request and green checks before anything reaches it.

Day 9

Prune

Remove origin/... bookmarks of branches that no longer exist on GitHub (git fetch --prune, or every fetch once fetch.prune is true).

Day 8

Public repository

A GitHub repo anyone can read. Only you and invited people can push. Private repos are hidden from everyone else.

Day 7

Pull

Fetch, then bring the upstream's new commits into your branch: by merging (--no-rebase) or by rebasing (--rebase). Without either, the pull.rebase setting decides.

Day 6

Pull request (PR)

A request on GitHub to merge one branch into another, with the diff, automatic checks, review comments and approvals in one place.

Day 8

Push

Upload your commits and move the remote branch forward. Rejected if it would lose commits that are only on the remote.

Day 6

R

Rebase

Replay your branch's commits on top of another commit, as copies with new ids. The result is a straight history.

Day 10

Rebase and merge

A merge method that copies each commit of the pull request onto the base branch with new ids, without a merge commit.

Day 8

Ref

A name that points to a commit, stored as a small file: branches in .git\refs\heads, tags in .git\refs\tags, and HEAD.

Bonus B6

Reflog

Your laptop's log of every place HEAD has been. Commits no branch points to are kept for at least 30 days, so you can find them here.

Day 11

Release

A GitHub page built on a tag, with notes and downloadable files. GitHub adds the source code archives automatically.

Day 13

Remote

Another copy of the repository that yours can push to and fetch from. Usually GitHub, named origin.

Remote-tracking branch

A read-only bookmark like origin/main that records where a GitHub branch was at your last fetch, pull or push.

Day 6

Repository (repo)

A project folder plus its complete history, stored in the hidden .git folder.

Required status check

A check that must pass before a pull request can be merged into a protected branch.

Day 9

Reset

Move the current branch to another commit. --soft keeps the changes staged, --mixed (the default) keeps them unstaged, and --hard throws them away.

Day 11

Revert

A new commit that does the opposite of an earlier one. The safe way to undo commits that are already pushed.

Day 11

Ruleset

GitHub's newer way to define branch protection rules, with an enforcement status and an optional bypass list.

Day 9

S

Semantic versioning

Numbering releases MAJOR.MINOR.PATCH: PATCH for bug fixes, MINOR for new features that break nothing, MAJOR for breaking changes.

Day 13

Squash

Combine a commit with the one before it into a single commit. fixup does the same but keeps only the first message.

Bonus B1

Squash and merge

A merge method that turns all of a pull request's commits into one new commit on the base branch.

Day 8

SSH key

A pair of files that proves who you are without a password: keep the private one on your laptop and give GitHub the public .pub one.

Day 7

Staging area

The list of changes you've picked for your next commit (also called the index). git add puts changes in; git restore --staged takes them out.

Day 2

Stale remote-tracking branch

An origin/... name for a branch that GitHub has already deleted. It stays in your clone until a fetch prunes it: git fetch --prune (or git pull --prune), or any fetch once fetch.prune is on (a Day 1 course setting).

Day 14

Stash

A shelf (a stack) where Git keeps uncommitted changes so your working folder is clean. git stash pop brings the newest back.

Day 4

Suggested change

A review comment containing replacement code. The author applies it with Commit suggestion, which makes a commit on the PR branch.

Day 9

System config

Git settings for every user of the computer, in C:\Program Files\Git\etc\gitconfig. Installed with Git for Windows.

Day 1

T

Tag

A permanent name for one commit, such as v1.0.0. Unlike a branch, it doesn't move when you commit.

Day 13

Todo list

The file Git opens during an interactive rebase: one line per commit (pick <id> <message>), run from top to bottom.

Bonus B1

Tracking branch

A local branch linked to a branch on GitHub (its upstream), such as alex/fix-rounding tracking origin/alex/fix-rounding. Plain git push and git pull then know where to go.

Day 10

Tree

The object that lists a folder: names and modes, pointing to blobs and to other trees.

Bonus B6

Trunk-based development

A branching strategy where everyone merges small changes into main at least daily, hiding unfinished work behind feature flags.

Day 13

U

Unpushed commit

A commit that exists only on your laptop, on no remote branch. git log --branches --not --remotes lists them. If your laptop dies, they're gone.

Day 14

Unrelated histories

Two branches with no commit in common, for example your first commit and a README commit GitHub made. Git won't merge them unless you ask explicitly.

Day 7

Untracked file

A file in your folder that Git has never saved. git status lists it under Untracked files until you add or ignore it.

Day 2

Upstream

The remote branch your local branch is linked to (for example origin/main). git push -u sets it; git status compares against it.

Day 6

Upstream repository

The original repository a fork was made from; the remote that points at it is called upstream by convention. Not the same as a branch's upstream, the remote branch it tracks (such as origin/main, Day 6).

Bonus B3

W

WIP commit

A work in progress commit that parks unfinished work on its own branch so you can push it for safety. Tidy it up before review (Bonus B1).

Day 14

Working folder

The files you see and edit (also called the working tree). Git notices changes here but doesn't save them until you add and commit.

Day 2

Worktree

An extra working folder attached to the same repository, with its own checked-out branch.

Bonus B4

WSL

Windows Subsystem for Linux: a separate Linux system inside Windows. On many Windows laptops, typing bash in PowerShell starts it.

Day 1