Lesson 18 intermediate

What’s New in Git (2.52 to 2.56)

Every new Git command of the last year in one place, with examples: git history, git last-modified, git repo, the git refs family, config-based and parallel hooks, git add --resolved, git branch --delete-merged, bisect auto-reset, and how to prepare for Git 3.0 with main, reftable and SHA-256.

Git ships a feature release roughly every three months, and the last year was one of the busiest in its history. Some changes are small conveniences; others, like the git history command and hooks defined in configuration, change how you work every day. And under the hood, Git is preparing its first major version since 2014: Git 3.0.

This lesson collects the news from Git 2.52 (November 2025) to Git 2.56 (September 2026), shows each new command on the Orbit repository and links to the lesson where it is covered in context.

Check and upgrade your Git

New commands only exist if your Git is new enough:

$ git --version
git version 2.56.0
SystemUpgrade with
Windowswinget upgrade --id Git.Git, or git update-git-for-windows from Git Bash
macOSbrew upgrade git
Ubuntu / Debiansudo add-apt-repository ppa:git-core/ppa, then sudo apt install git
Fedora / RHEL familysudo dnf upgrade git (newer releases arrive with distribution updates)

CI runners and container images often carry an older Git than your laptop. Check git --version in a pipeline job before relying on a new command there.

The releases at a glance

VersionReleasedHighlightsLesson
2.52Nov 2025git last-modified, git repo, git refs list and exists, sparse-checkout clean12
2.53Feb 2026git repo info --all, blame --diff-algorithm, more Rust in the build12
2.54Apr 2026git history reword and split, hooks in config, rebase --trailer, status.compareBranches9, 13, 15
2.55Jun 2026git history fixup, parallel hooks, file system monitor on Linux, push to remote groups7, 13, 15
2.56Sep 2026git add --resolved, git branch --delete-merged, git history drop, git refs create and friends4, 5, 9

Editing history: git history (2.54 to 2.56)

The biggest change for everyday users. git history handles the most common history edits with one command each, without an interactive rebase, without a todo list and without disturbing the files you are working on. It is still marked experimental.

$ git log --oneline -4
f1a9e20 (HEAD -> feature/search) Add debug logging
b7d3c11 Add date rankng to search
0e5c8a7 Add search tests and fix README
c42d9e1 Add search endpoint
$ git history reword b7d3c11       # 2.54: fix the typo "rankng" in the editor
$ git history split 0e5c8a7        # 2.54: pick the README hunks into their own commit
$ git add search.js
$ git history fixup c42d9e1        # 2.55: fold the staged fix into the first commit
$ git history drop f1a9e20         # 2.56: remove the debug logging commit

Every local branch that contains an edited commit is updated too. The command refuses to run on histories with merge commits and stops rather than creating conflicts. As with any rewrite, only use it on commits you have not shared. Lesson 9 compares it with reset and rebase.

Hooks in configuration (2.54) and in parallel (2.55)

Hooks no longer have to be files in .git/hooks. You can define named hooks in any configuration file, including your global one, several per event:

$ git config set --global hook.no-secrets.event pre-commit
$ git config set --global hook.no-secrets.command "~/bin/scan-secrets --staged"
$ git hook list pre-commit

In 2.55, hooks that declare hook.<name>.parallel = true can run at the same time, with hook.jobs setting how many. Hooks that inspect the index or the commit message still run one at a time. Lesson 13 has the full setup.

Safer merges and cleanup (2.56)

Two small commands that prevent common mistakes:

$ git merge feature/search
CONFLICT (content): Merge conflict in server.js
$ git add --resolved                        # stages only conflicted files, refuses if markers remain
$ git commit

$ git fetch --prune
$ git branch --delete-merged 'origin/*' --dry-run   # local branches merged into their upstream
$ git branch --delete-merged 'origin/*'

git add --resolved checks for leftover <<<<<<< markers before staging anything (lesson 5). git branch --delete-merged removes local branches whose work is already in their upstream (lesson 4). Git 2.56 also made merge-base computation much faster in repositories with many branches, so merges and rebases start quicker in large monorepos.

Debugging and history search

$ git bisect start HEAD v1.3.0
$ git bisect run --reset-when-found ./scripts/check-search-speed.sh   # 2.56: cleans up when done
$ git last-modified -- deploy/                                        # 2.52: last commit per path
$ git blame --diff-algorithm=histogram server.js                      # 2.53

Git 2.54 also lets git log -L work with -S, -G and --word-diff, and 2.56 made git log --follow reliable through merge-heavy history. In 2.56, git log --graph indents separate root histories by default; --no-graph-indent or log.graphIndent false brings back the old drawing. Lesson 12 covers these tools.

Plumbing with friendlier names: git repo and git refs

Git has always had low-level commands for scripts, with names like rev-parse, for-each-ref and update-ref. New commands group this functionality under clearer names:

$ git repo info object.format references.format     # 2.52: facts about the repository
object.format=sha1
references.format=files
$ git repo info --all                                # 2.53: every available key
$ git refs list --sort=-committerdate refs/heads     # 2.52: same as git for-each-ref
$ git refs exists refs/heads/main && echo yes        # 2.52: same as git show-ref --exists
$ git refs create refs/heads/topic HEAD              # 2.56
$ git refs rename refs/heads/topic refs/heads/topic-renamed   # 2.56

git refs update and git refs delete accept an expected old value, so a script can say “move this branch only if it still points where I think”, which avoids races. Note that git refs rename moves the reference and its reflog but does not adjust branch configuration the way git branch -m does: for normal branch work, keep using git branch. git repo is still marked experimental.

Quality of life

  • Typo hints (2.56): git push origin/main now suggests git push origin main, and git branch --set-upstream-to origin main suggests the origin/main form.
  • Push to remote groups (2.55): git push <group> pushes to every remote listed in remotes.<group> (lesson 7).
  • git checkout -m autostash (2.55): local changes that do not carry over cleanly are saved as a stash entry instead of left half-merged.
  • git add -p (2.54): shows whether a hunk you return to was already accepted or skipped.
  • Rate limits (2.54): Git honours HTTP 429 “Too Many Requests” with Retry-After, tunable with http.maxRetries and http.maxRetryTime, which helps busy CI runners.
  • Status for forks (2.54): status.compareBranches = @{upstream} @{push} reports ahead and behind for both branches (lesson 15).
  • File system monitor on Linux (2.55): core.fsmonitor true makes git status fast in huge working trees (lesson 15).
  • Maintenance (2.54): git maintenance uses geometric repacking by default; maintenance.strategy = gc restores the old behaviour.

The road to Git 3.0

Git keeps a list of planned breaking changes for its next major version. The ones you will notice:

ChangeWhat it meansTry it today
Default branch maingit init creates main instead of mastergit config set --global init.defaultBranch main
Reftable by defaultBranches and tags stored in a compact binary format, faster with many refsgit init --ref-format=reftable or git refs migrate --ref-format=reftable
SHA-256 for new repositoriesStronger hashes replace SHA-1 when hosting and tooling are readygit init --object-format=sha256 (local experiments)
Rust required to build GitOnly matters if you compile Git yourselfRecent releases already include optional Rust code
$ git init --ref-format=reftable lab-reftable
$ git -C lab-reftable repo info references.format
references.format=reftable

As of November 2026, the Git project has not announced a release date for 3.0, and it states that the SHA-256 switch waits until hosting platforms and tools support it. Existing SHA-1 repositories will keep working; there is no plan to remove them. Use SHA-256 repositories only for experiments for now, because most hosting services cannot accept them yet.

How to keep up

  • Read the release notes in the Git source (Documentation/RelNotes/) or the “Highlights from Git” posts on the GitHub blog, published with each release.
  • Prefer stable commands in scripts; anything marked experimental (git history, git repo, git replay) may change its options.
  • Upgrade Git on CI images too, and pin the version there so pipelines do not change behaviour unexpectedly.

Quick reference

TaskCommandSince
Edit a commit messagegit history reword <commit>2.54
Split a commitgit history split <commit>2.54
Fold staged changes into a commitgit history fixup <commit>2.55
Remove a commitgit history drop <commit>2.56
Hook from confighook.<name>.event + hook.<name>.command2.54
Stage only resolved conflictsgit add --resolved2.56
Delete merged branchesgit branch --delete-merged 'origin/*'2.56
Last commit per pathgit last-modified2.52
Repository factsgit repo info --all2.53
Bisect that cleans upgit bisect run --reset-when-found <script>2.56
Try Git 3.0 reference storagegit init --ref-format=reftable2.45

Exercise

On Git 2.56, you want to remove one unpushed commit from the middle of your branch without opening an interactive rebase. Which command does it?

  1. git revert <commit>
  2. git reset –hard <commit>
  3. git history drop <commit>
  4. git branch –delete-merged
Show answer

Answer: C. git history drop (Git 2.56, experimental) removes the commit and replays the later ones onto its parent. revert would add a new commit instead, and reset would throw away every later commit too.

Exercise

Which of these will change for brand-new repositories when Git 3.0 ships, according to the plan?

  1. Existing SHA-1 repositories will stop working
  2. git push will require signed commits
  3. git switch will be removed
  4. git init will create a main branch and use reftable for references
Show answer

Answer: D. The planned defaults for new repositories are main as the initial branch and reftable as the reference backend, with SHA-256 following once the ecosystem is ready. Existing repositories keep working.

Exercise

A script on your CI runner fails with “git: ‘last-modified’ is not a git command”. What is the most likely cause?

  1. The runner’s Git is older than 2.52, where git last-modified was added
  2. The repository is a shallow clone
  3. git last-modified only works on GitHub
  4. The command must be enabled with an experimental flag
Show answer

Answer: A. New commands only exist in new releases. CI images often ship an older Git, so check git –version in the job and upgrade or pin a newer image.

Key takeaways

  • Git releases a feature version about every three months; check git --version locally and in CI.
  • git history (2.54 to 2.56) rewords, splits, fixes up and drops commits without a rebase; it is still experimental.
  • Hooks can live in config (2.54) and run in parallel (2.55).
  • git add --resolved and git branch --delete-merged (2.56) prevent common merge and cleanup mistakes.
  • Git 3.0 will default to main and reftable, then SHA-256; there is no release date yet, and existing repositories keep working.

FAQ

Is it safe to use experimental commands like git history?

For your own local, unpushed commits, yes: they refuse unsafe situations such as conflicts and merges, and the reflog can undo them. Avoid them in shared scripts, because their options may still change between releases.

When will Git 3.0 be released?

There is no official date. The Git project lists the planned breaking changes and has said some, especially the SHA-256 default, will wait until hosting platforms and tools are ready. Follow the release notes for announcements.

Do I need to convert my repositories to SHA-256 or reftable?

No. SHA-1 repositories and the classic reference format stay supported. Reftable can be adopted locally with git refs migrate if you have many branches and tags; SHA-256 conversion of existing repositories is not something you need to plan for today.

Will Git 3.0 rename master to main in my existing repositories?

No. The change only affects the default name for repositories created with git init when you have not set init.defaultBranch. Existing branches keep their names.

Where can I read about each release in detail?

The official release notes are in the Git source tree under Documentation/RelNotes/, and the GitHub blog publishes a “Highlights from Git” post for every release, with examples.

↑ ↓ navigate Enter open Esc close