2.0.0

Git v2.0 Release Notes ======================

Backward compatibility notes ----------------------------

When "git push [$there]" does not say what to push, we have used the traditional "matching" semantics so far (all your branches were sent to the remote as long as there already are branches of the same name over there). In Git 2.0, the default is now the "simple" semantics, which pushes:

You can use the configuration variable "push.default" to change this. If you are an old-timer who wants to keep using the "matching" semantics, you can set the variable to "matching", for example. Read the documentation for other possibilities.

When "git add -u" and "git add -A" are run inside a subdirectory without specifying which paths to add on the command line, they operate on the entire tree for consistency with "git commit -a" and other commands (these commands used to operate only on the current subdirectory). Say "git add -u ." or "git add -A ." if you want to limit the operation to the current directory.

"git add <path>" is the same as "git add -A <path>" now, so that "git add dir/" will notice paths you removed from the directory and record the removal. In older versions of Git, "git add <path>" used to ignore removals. You can say "git add --ignore-removal <path>" to add only added or modified paths in <path>, if you really want to.

The "-q" option to "git diff-files", which does NOT mean "quiet", has been removed (it told Git to ignore deletion, which you can do with "git diff-files --diff-filter=d").

"git request-pull" lost a few "heuristics" that often led to mistakes.

The default prefix for "git svn" has changed in Git 2.0. For a long time, "git svn" created its remote-tracking branches directly under refs/remotes, but it now places them under refs/remotes/origin/ unless it is told otherwise with its "--prefix" option.

Updates since v1.9 series -------------------------

UI, Workflows & Features

Performance, Internal Implementation, etc.

Also contains various documentation updates and code clean-ups. Many of them came from flurry of activities as GSoC candidate microproject exercises.

Fixes since v1.9 series -----------------------

Unless otherwise noted, all the fixes since v1.9 in the maintenance track are contained in this release (see the maintenance releases’ notes for details).

Note that such a configuration is inherently unsafe (think what
should happen when "refs/heads/fr/otz" does appear on the origin
site), but that is not a reason not to be extra careful.
(merge e6f6371 cn/fetch-prune-overlapping-destination later to maint).

版本号 #2
由 壳壳虫 创建于 2026-10-31 19:53:05 UTC
由 壳壳虫 更新于 2026-10-31 19:53:07 UTC