Git 2.54 introduit en expérimentation la commande git history
mar, 21/04/2026 - 08:23
Git annonce la version 2.54. La principale fonctionnalitée est la commande git history. Attention, pour le moment, elle est en expérimentation. git history est là pour "réécrire" l'histoire des référentiels Git. On peut déjà réorganiser un dépôt avec la fameuse commande rebase. Pour des cas plus simples, rebase semble trop complexe et avec trop d'options. La commande history est là pour modifier le dépôt : par exemple, corriger une faute dans un texte de commit ancien ou encore scinder un commit en deux, etc. Cette commande supporte pour le moment reword et split.

git history reword <commit> : ouvre l'éditeur avec le commit spécifié et on peut le réécrire. Il mettra à jour les branches dépendantes. La commande ne modifie par le tree ou l'index de travail
git history split <commit> : permet de scinder un commit en 2
Git 2.24 permet maintenant de définir des hooks pouvant être partagé dans plusieurs dépôts et fichiers de configuration. Git introduit le concept de config basée sur les hooks.
La liste des améliorations et ajustements est très longue :
* "git add -p" and friends note what the current status of the hunk being shown is.* "git history" history rewriting (experimental) command has been
added.* "git replay" is taught to drop commits that become empty (not the
ones that are empty in the original).* The help text and the documentation for the "--expire" option of
"git worktree [|prune]" have been improved.* When "git show-index" is run outside a repository, it silently
defaults to SHA-1; the tool now warns when this happens.* "git merge-file" can be run outside a repository, but it ignored
all configuration, even the per-user ones. The command now uses
available configuration files to find its customization.* "auto filter" logic for large-object promisor remote.
* "git rev-list" and friends learn "--maximal-only" to show only the
commits that are not reachable by other commits.* Command line completion (in contrib/) update for
"stash import/export".* "git repo info" learns "--keys" action to list known keys.
* Extend the alias configuration syntax to allow aliases using
characters outside ASCII alphanumeric (plus '-').* A signature on a commit that was GPG signed a long time ago ought to
be still valid after the key that was used to sign it has expired,
but we showed them in alarming red.* "git subtree split --prefix=P <commit>" now checks the prefix P
against the tree of the (potentially quite different from the
current working tree) given commit.* "git add -p" learned a new mode that allows the user to revisit a
file that was already dealt with.* Allow the directory in which reference backends store their data to
be specified.* "gitweb" has been taught to be mobile friendly.
* "git apply --directory=./un/../normalized/path" now normalizes the
given path before using it.* "git maintenance" starts using the "geometric" strategy by default.
* "git config list" is taught to show the values interpreted for
specific type with "--type=<X>" option.* "git add <submodule>" has been taught to honor
submodule.<name>.ignore that is set to "all" (and requires "git add
-f" to override it).* Hook commands are now allowed to be defined (possibly centrally)
in the configuration files, and run multiple of them for the same
hook event.* The way end-users can add their own "git <cmd>" subcommand by
storing "git-<cmd>" in a directory on their $PATH has not been
documented clearly, which has been corrected.* "git send-email" learns to pass hostname/port to Authen::SASL
module.* "git send-email" learns to support use of client-side certificates.
* "git send-email" has learned to be a bit more careful when it
accepts charset to use from the end-user, to avoid 'y' (mistaken
'yes' when expecting a charset like 'UTF-8') and other nonsense.* "git status" learned to show comparison between the current branch
and various other branches listed on status.compareBranches
configuration.* "git repo structure" command learns to report maximum values on
various aspects of objects it inspects.* "git rebase" learns "--trailer" option to drive the
interpret-trailers machinery.* "git fast-import" learned to optionally replace signature on
commits whose signatures get invalidated due to replaying by
signing afresh.* "git history" learned the "split" subcommand.
* The reference-transaction hook was taught to be triggered before
taking locks on references in the "preparing" phase.* "git apply" now reports the name of the input file along with the
line number when it encounters a corrupt patch, and correctly
resets the line counter when processing multiple patch files.* The HTTP transport learned to react to "429 Too Many Requests".
* "git repo info -h" and "git repo structure -h" limit their help output
to the part that is specific to the subcommand.* "git format-patch --cover-letter" learns to use a simpler format
instead of the traditional shortlog format to list its commits with
a new --commit-list-format option and format.commitListFormat
configuration variable.* `git backfill` learned to accept revision and pathspec arguments.
* "git replay" (experimental) learns, in addition to "pick" and
"replay", a new operating mode "revert".* "git replay" now supports replaying down to the root commit.
* Handling of signed commits and tags in fast-import has been made more
configurable.* "git config list" is the official way to spell "git config -l" and
"git config --list". Use it to update the documentation.
De nombreuses pull requests, et bugs, ont été fixés dans cette 2.24.
Note de version complète : https://lore.kernel.org/lkml/xmqqa4uxsjrs.fsf@gitster.g/
Le résumé de GitHub : https://github.blog/open-source/git/highlights-from-git-2-54/
[/]
