Operations 9 min read

Git 2.55 Release: Rust Enabled by Default – What You Need to Know

Git 2.55 introduces Rust as the default implementation, adds a one‑step git history fixup command, enables parallel hook execution, and brings Linux inotify‑based fsmonitor support, while also delivering incremental MIDX repacking and sparse‑checkout speedups, prompting developers to adjust CI pipelines or disable Rust before Git 3.0.

21CTO
21CTO
21CTO
Git 2.55 Release: Rust Enabled by Default – What You Need to Know

Git 2.55 was released on June 29, 2024 and marks a major shift: Rust is now enabled by default. Previously developers had to compile Git with WITH_RUST=1; now the default is Rust unless the build is explicitly disabled with NO_RUST=1. Any CI pipeline that builds Git from source must provide a working Rust toolchain, otherwise container rebuilds may fail.

Disabling Rust

To keep Rust disabled, add the flag during the build:

# Makefile builds
make NO_RUST=1
# Meson builds
meson configure -Drust=disabled

Pre‑built packages from Linux distributions already handle this at the packaging level, but self‑compiled Git versions need the flag. The upcoming Git 3.0 (expected end of 2026) will remove the NO_RUST option entirely, making Rust mandatory.

Git history fixup – one command replaces two

Introduced experimentally in Git 2.54, the git history fixup sub‑command in 2.55 collapses the previous two‑step workflow ( git commit + interactive rebase) into a single command. It stages your changes, then runs the fixup against a target commit SHA, automatically replaying subsequent commits and updating all local branches that contain the fixed commit—especially useful for stacked‑branch workflows.

The command is still experimental: it works only on non‑bare repositories and aborts cleanly on merge conflicts, which is safer than an interactive rebase that can leave HEAD detached.

Parallel hooks – run checks and tests together

Git 2.55 adds optional parallel execution for configured hooks. By setting parallel = true and jobs = -1 in a hook’s configuration, independent pre‑push or post‑merge hooks (e.g., code linters and unit‑test runners) can run concurrently, using all CPU cores. Pre‑commit and prepare‑commit‑msg are excluded because they share the commit‑message buffer.

Linux fsmonitor – fast git status on huge repos

The built‑in fsmonitor daemon now supports Linux via the inotify subsystem. Enable it with:

git config core.fsmonitor true
git fsmonitor--daemon start

In a benchmark, bitmap generation time dropped from 612 s to 294 s, and git status on a 500 k‑file repository became near‑instantaneous after the daemon started. Users must raise the inotify watch limit (default 8 192) for large monorepos, e.g., sysctl -w fs.inotify.max_user_watches=524288 or add the setting to /etc/sysctl.conf.

Other notable changes

Git 2.55 adds incremental MIDX repacking, which appends new pack layers instead of rewriting the entire multi‑pack index—beneficial for hosting services and large monorepos. Sparse checkout performance improves by roughly 50 % when checking out a small subset of a massive tree. Hook execution behavior is further extended, laying groundwork for more advanced hook management in future releases.

What to do now?

If you build Git from source, ensure Rust is in your toolchain before Git 3.0, or explicitly disable it with NO_RUST=1. For packaged Git, enable fsmonitor on Linux and try the new git history fixup command. Configuring parallel hooks takes only a few minutes and can shave time off each push.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

rustGitci-pipelinesfsmonitorgit-2.55git-history-fixupparallel-hooks
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.