
The arrival de Go to 2.54 This marks a new step in the evolution of the world's most widely used version control system for software development. The project community, with over 130 people collaborating on this cycle, has focused on simplifying common tasks without sacrificing the power that characterizes Git.
Among the new features that may be of most interest are a new way to rewrite history In a much more direct way, the ability to configure shared hooks from common configuration files and internal improvements that seek faster and easier-to-maintain repositories, especially in large or corporate projects.
Git 2.54: Overview of the new release
Git 2.54 is an intermediate version on the path to the future 3.0 branch, but it brings changes that affect the day-to-day work of many developers. For one thing, The experimental command git history is releasedDesigned for simple history rewriting operations. Furthermore, the hooks system is expanded and modernized, and can now be managed from the settings; the geometric maintenance strategy is now the default.
In addition, improvements are included in already known commands such as git add -p, git replay, git status or git rebaseas well as adjustments to HTTP transport, the way GPG signatures are displayed, and the internal workings of the object database. Although many of these new features are advanced, their impact will be noticeable in common workflows in businesses, public administrations, and open source projects with large repositories.
New experimental command git history: easy rewriting of commits
One of the major additions in Git 2.54 is git history, a still-experimental command intended to cover cases where using an interactive rebase is overkill. Until now, the go-to tool for modifying the local history was git rebase -i, very flexible but also more complex and prone to leaving the user in conflicting states that must be resolved manually.
With git history A more direct approach is sought for specific tasks: for example, correct a typo in the message of a commit from a few changes ago, or splitting a commit that has become too large into two. The idea is to offer a controlled way to tweak the history without having to set up the whole machinery of an interactive rebase with task lists and intermediate steps.
reword subcommand: tweak commit messages without touching the working tree
The first mode that the new order is launching is git history reword <commit>When invoked, Git opens the user-configured editor with the specified commit messageallowing you to modify it directly. When you save and close the editor, Git rewrites that commit and automatically updates the branches that descend from it to point to the new version.
The key difference compared to an interactive rebase is that `git history reword` does not touch either the working tree or the indexIt only updates the history. This makes it especially useful in continuous integration environments or automated scripts, as it can even operate on bare repositories, which is common in internal code servers of companies or institutions where there is no associated working tree.
split subcommand: interactively split a commit
The second mode, git history split <commit>It's designed for situations where a single commit contains changes that should be separated. When executed, Git displays the hunks associated with that commit and allows you to choose which ones should be extracted to a new parent commit, similar to how `git extract` works. git add -p when deciding which pieces of code to add to the index.
Once the fragments are selected, Git creates a New commit with the hunks chosen as the parent of the originalIt keeps the unselected changes in the previous commit. Then, it rewrites the descendant branches to point to the new history structure. Again, the operation runs without altering the current contents of the working tree, reducing the likelihood of leaving the repository in a complicated intermediate state.
Limitations and compatibility with other workflows
To keep behavior controllable, git history does not support histories with merge commits and refuses to continue if the operation results in merge conflicts. It's designed for minor adjustments, not for massive rewrites like those typically handled with git rebase -i or more aggressive history cleaning strategies.
Internally, the command relies on the machinery of git replaywhich has been consolidating as an experimental tool for reproducing commits on another base without touching the working tree. Part of this work has consisted of extracting that logic into a common library, so that both git history as other future functionalities can benefit from a more modular infrastructure that is easier to automate from scripts or third-party tools.
Configuration-based hooks: sharing and combining automations
Another notable new feature of Git 2.54 is the ability to define hooks directly in the configuration files, instead of relying solely on scripts placed in the directory .git/hooks or on the route indicated by core.hooksPathThis change makes it much easier to share checks between different repositories without having to replicate files manually.
Until now, to apply, for example, a code formatter or a secrets analyzer before each commit across multiple projects, it was necessary to copy the hook script to each repository or use external hook management tools. With the new approach, it's possible to define central hooks in ~/.gitconfig or a /etc/gitconfig corporate and that these be applied where necessary.
Defining hooks by configuration and multiple commands per event
The new syntax is based on style configuration keys hook.<nombre>.command y hook.<nombre>.eventThe first indicates which command will be executed, and the second specifies which hook event triggers itfor example a pre-commit or pre-pushSince it is a standard configuration, these settings can coexist at different levels: user, system, or repository.
Furthermore, Git now allows that multiple hooks are assigned to the same eventIn other words, you can define, for example, a linter and a credential scanner to run on each pre-commitwithout needing to manually combine them into a single script. Git iterates through the configuration entries in order and executes each command, while also maintaining support for the classic script. $GIT_DIR/hooks, which continues running at the end so as not to break previous configurations.
Management, deactivation and internal modernization of hooks
To check which hooks are active and where they come from, the following command is incorporated git hook listwhich shows the origin of each one, something useful when managing centralized configurations In corporate environments, if a specific repository needs to exclude a hook inherited from a global file, it is enough to set hook.<nombre>.enabled = false, without needing to delete or modify the original configuration.
Under the hood, Git has unified and modernized the way it handles many of its internal hooksSeveral integration points that were previously managed with ad hoc routes, such as hooks for pre-push, post-rewrite or those of receive-packThey are now using the new hooks API. This not only brings consistency, but also makes it easier for continuous integration environments or code forging platforms to adapt to future changes without having to rewrite specific integrations.
Geometric maintenance as a default strategy
In previous versions, Git introduced the so-called strategy geometric within git maintenanceDesigned to reduce the cost of repacking tasks in large repositories, this strategy analyzes existing packfiles and looks for combinations that form a geometric progression by number of objects, condensing their contents without needing to perform a full garbage collection each time.
With Git 2.54, this approach becomes the default option for manual maintenanceWhen it runs git maintenance run Without specifying the strategy, the geometric approach is automatically chosen, instead of resorting directly to the classic task of gc which tries to group everything into a single package.
In practice, this means that Repositories are maintained more efficiently From the outset, this is especially interesting for projects with a long history or for organizations that manage large monorepositories. The geometric strategy combines incremental packages when it makes sense and only resorts to a gc Complete when it's actually going to consolidate everything into a single packfile. During the process, the commit graph, reflogs, and other auxiliary structures are kept up to date.
Those who had already configured maintenance.strategy = geometric They won't notice any changes, as that preference is respected. And those who prefer to continue with the traditional approach can force the strategy gc Setting maintenance.strategy = gcthus maintaining compatibility with more conservative flows.
Improvements to interactive and experimental commands
Beyond the major new features, Git 2.54 brings a good range of changes aimed at refine the daily user experienceespecially in commands that are used interactively to manage changes.
Refinements in git add -py new navigation options
The interactive mode of git add -p and related commands receive various usability improvements. When navigating between hunks using the keys J y KGit now shows if a fragment has been accepted or skipped previouslyavoiding having to manually remember each decision.
The option is also added --no-auto-advancewhich changes the behavior when finishing with hunks of a file. Instead of automatically moving to the next file, the session remains on the current one, allowing you to use < y > to move between files more calmly. This way of working is useful when you want to review the selection of changes as a whole before confirming them.
git replay: more maturity for re-executing commits
The experimental order git replayThe feature designed to replicate commits on a new base without modifying the working tree continues to gain capabilities. In this version, it now performs atomically update references By default, instead of dumping commands update-ref on standard output.
In addition, it incorporates a mode --revert allowing reverse the changes from a range of commitsIt is capable of discarding commits that become empty during the process and now supports replaying the history back to the root commit. These improvements fit well with the use of git history, which relies on the same infrastructure to offer a safer experience.
New option – trailer in git rebase
Another interesting adjustment is the addition of --trailer en git passwhich takes advantage of the logic of interpret-trailers all with add the same trailer to each overshot commitInstead of building long commands with -x and calls to git commit --amend --no-edit --trailer=...You can directly specify the desired trailer when launching the overrun.
This greatly simplifies repetitive tasks such as incorporating lines of type Reviewed-by: or annotations similar to a series of commits, something common in formal code review processes used in distributed teams.
HTTP transport and signature management: more refined behavior
In terms of network communication, Git 2.54 introduces relevant changes in the handling of HTTP responses and in the interpretation of cryptographic signatures associated with commits and tags.
HTTP 429 response management and configurable retries
Git's HTTP transport learns to correctly interpret the codes 429 «Too Many Requests»Until now, when a server returned a 429 error, it was considered a fatal error and the operation failed. Starting with this version, Git can retry the request while respecting the header value. Retry-After if present, or using a configurable delay via the new option http.retryAfter.
The adjustments are also added http.maxRetries y http.maxRetryTime, which allow control the maximum number of retries and the total time spent on themThis is practical in corporate environments where access is required to overloaded servers or servers with strict request limiting policies, helping to streamline operations. fetch y push be more resilient without punishing the server.
Handling GPG signatures with expired keys
Regarding security, a potentially misleading behavior has been corrected: when a commit was signed with a GPG key that had subsequently expired, Git displayed the signature in an alarming red colorThis suggested that the signature was invalid. However, if the signature was valid at the time, that validity should remain even if the key has since expired.
Git 2.54 adjusts this logic and goes on to consider Signatures that were correctly made before the key expired are valid.This avoids unnecessary alerts. It provides a more accurate picture of the repository's history, which is relevant for projects with long lifecycles, such as institutional or public administration software that is maintained for many years.
New inspection capabilities and history customization
Several commands designed to explore history receive improvements that increase their flexibility and allow for more tailored outputs for each case.
`git log -L` integrates with standard diff machinery
The option git log -LThe function that allows tracking the evolution of a range of lines in a specific file has been reimplemented to route its output through the standard Git diff mechanismPreviously, it used its own path, which made it incompatible with very useful options such as -S y -G (the so-called "pickaxes"), or with different patch formats.
With the change introduced in Git 2.54, -L becomes compatible with advanced content and diff format searchesIncluding --word-diff o --color-movedThis way, the output can be limited to a specific function and, at the same time, filtered only for commits that add or remove a specific symbol, which facilitates code audits and regression analysis.
git blame with diff algorithm selection
The command git blame, used to see which commit introduced each line of a file, learns a new option --diff-algorithmThis allows you to choose between different diff algorithms, such as histogram, patience, or minimal, when calculating line attribution.
Depending on the type of changes a file has undergone, Choosing one algorithm over another can offer clearer resultsThis reduces noise in highly active code histories. In environments where detailed reviews are highly valued, this level of control can make all the difference when investigating who introduced a particular block of code.
Storage optimization and object databases
The changes in this version aren't limited to the user interface; there's also considerable work done on how Git works. organizes and accesses data internallyThis has a particularly significant impact on large repositories.
Incremental multi-pack indices and compaction
The calls multi-pack incremental indexes (MIDX)Features already being improved in previous versions, Git 2.54 now includes support for layer compaction. This mechanism combines smaller MIDX layers, along with their associated reachability bitmaps, to keep the layer chain at a reasonable size.
This step is important for making incremental MIDX practical in long-lived repositoriessuch as those of large organizations or community projects with many years of history. Compacting the layers reduces the complexity of searches and improves performance in operations such as fetch, clone partial or history inspections.
Object Database (ODB) Restructuring
Internally, a deep refactoring of the object database API (ODB). Now a pluggable backend design is used, in which functions such as read_object(), write_object() o for_each_object() They are dispatched using function pointers by origin.
Although this change is not immediately visible to the end user, it lays the foundation for future alternative storage backends or more flexible object database configurations. For companies with specific regulatory compliance requirements or integration with their own storage systems, this modularity can open the door to more tailored solutions.
Improvements to status, aliases, backfill, and other details
Git 2.54 also incorporates a number of adjustments that, although smaller, contribute to refining daily use and adapting Git to varied linguistic and network contexts.
git status and comparison with several remote branches
The command git state debuts the configuration option status.compareBranchesBy default, this command showed how the current branch compared to its configured upstream, something typical like origin/mainWith the new option, you can request a comparison with the push branch, or with both at the same time.
This functionality is designed to triangular flows, common when working with forks: you can download from an official remote and send changes to a different one, keeping clear at all times how many commits separate each branch, which reduces surprises when synchronizing repositories.
Alias ​​with international characters
Until now, Git aliases were limited to ASCII alphanumeric characters and hyphens, preventing the use of names in other languages ​​with accents or different alphabets. The new syntax supports virtually any character except line breaks and NUL. Matching is done as raw bytes and is case-sensitive. Furthermore, the shell autocomplete system has been updated to handle these aliases, making Git easier to use in multilingual teams.
Git backfill is more practical in partial clones
The experimental command git backfillThe command used to download missing blobs in partial clones is also being reinforced. Previously, the command always retrieved reachable blobs from HEAD throughout the entire tree, which could be excessive in particularly large repositories.
Git 2.54 adds support for review arguments and pathspecso that the backfill can be limited to a range of history (for example, main~100..main) or to certain specific routes (git backfill -- '*.c'), including wildcard patterns. This makes it much more manageable to work with large partial clones where you only need to complete the history of a specific part of the code.
Other adjustments and detailed improvements
The Git 2.54 changelog includes a long list of small improvements. Among them is a fix for the diff algorithm. histogramwhich now prevents the compaction phase from moving groups of changes in a way that breaks the selected anchor lines, producing cleaner and less redundant diffs.
Tools such as git config list , which is becoming established as the official way to list configuration, git merge-file which then respects the available configuration even outside of a repository, and several related utilities git send-emailwhich gain support for client certificates and more careful handling of user-selected character sets.
Git's evolution continues at a good pace with version 2.54, which combines visible improvements for the user, like the new order git history or configurable hooks, which require significant work on the system's internal infrastructure. All of this points to a more robust, flexible ecosystem, better prepared for the challenges of increasingly larger repositories and more diverse teams.
