gitlab

What's new in Git 2.55.0? (opens in new tab)

Git 2.55.0 introduces improvements focused on stacked-branch workflows, large repositories, multi-remote setups, and clearer history visualization. Highlights include git history fixup, a built-in Linux filesystem monitor, remote-group pushing, and a configurable width limit for git log --graph. The release also continues Git’s Rust adoption and improves performance for partial clones.

git history fixup

  • Adds git history fixup <commit-id>.
  • Takes staged changes and amends them directly into an existing commit.
  • Avoids creating a separate fixup commit and running an interactive autosquash rebase.
  • Automatically updates other local branches containing the amended commit, making it useful for stacked branches.

Built-in fsmonitor support for Linux

  • Git’s filesystem monitor speeds up git status by tracking changed files instead of scanning the entire worktree.
  • Git 2.55 extends the built-in core.fsmonitor=true daemon from Windows and macOS to GNU/Linux.
  • Linux support uses inotify, avoiding the elevated privileges required by fanotify.
  • The daemon needs a watcher for every repository directory, so large repositories may require increasing fs.inotify.max_user_watches.

Pushing to remote groups

  • Remote groups were previously supported by git fetch but not git push.
  • Configure a group, for example:
    git config set remotes.forks "origin upstream"
    
  • Push to every remote in the group with:
    git push forks main
    
  • Each remote is handled independently and follows its own remote.<name>.push mappings and mirror settings.

Limiting git log --graph width

  • git log --graph can become difficult to read in repositories with many parallel branches.
  • Git 2.55 adds a way to limit the graph’s lane width, preventing the ASCII history from expanding indefinitely.
  • This is particularly useful for large projects such as Git itself, where the graph can become many lanes wide after only a few commits.

Rust adoption and partial-clone performance

  • The release continues the gradual evolution of Rust within Git’s codebase.
  • git grep and git cherry receive performance improvements when operating in partial clones.

Git 2.55 is especially useful for developers working in large monorepos or stacked-branch workflows. Enabling the Linux fsmonitor, using git history fixup, and configuring remote groups can provide immediate productivity benefits, while graph-width limits make complex histories easier to inspect.