Git 2.8 Adds Improvements to Submodules, Identity Handling, and Windows Support
Recently announced Git 2.8 brings many new features, improvements, and bug fixes. Among the most noteworthy are parallel fetch for submodules, an improvement to how Git handles a user’s identity, and better support for Windows.
Submodules parallel fetch aims at reducing the time required to fetch a repositories and all of its related submodules by enabling the fetching of multiple repositories at once. This can be accomplished by using the new
--jobs option, e.g.:
git fetch --recurse-submodules --jobs=4
According to Git team, this can substantially speed up updating repositories that contain many submodules. When using
--recurse-submodules without the new
--jobs option, Git will fetch submodules one by one.
A new feature that will be welcomed by all developers that want to use different identities for different projects, e.g., work projects and open source projects, is a global configuration option that will disable Git’s default behaviour of guessing the committer’s identity when no explicit identity has been specified through the
user.email config options. In such cases, Git by default guesses the committer’s identity, which may lead to the wrong identity being used for a new repository. On the other hand, setting the new
user.useconfigonly option, i.e.,
git config --global user.useconfigonly true
will make Git emit a warning when the developer commits to a new repository and force them to provide an explicit identity to use for that repo if none has been specified.
A related change aims to make it easier to tell where a specific setting has been defined, whether as system-, user-, or repo-level. Indeed, developers can now use:
git config --show-origin <setting name>
to be shown where that specific setting comes from.
Git 2.8 also aims to improve its integration with Windows by:
- rewriting many Git commands in C to make them faster;
- merging a number of Windows-specific changes from the it-for-Windows;
- enabling the recognition of CRLF line endings along with LF.
Additionally, Git 2.8.0 fixes an integer overflow security vulnerability that could result in executing arbitrary code when cloning a malicious repository. The patch has been also made available for previous Git versions, namely 2.4.11+, 2.5.5+, 2.6.6+, 2.7.4+.
Other useful new features in Git 2.8 are:
git ls-files --eol <filename>may help diagnose end-of-line related issues;
git pull --rebasecan now invoke history rewriting using
You can read the full list of changes to Git 2.8 here.