Adds more convenient pathspecs, conditional configuration

May 10, 2017 12:32 GMT  ·  By

The Git project, through Jeff King, happily announced today the release and immediate availability of the Git 2.13 open source project management system for all supported platforms.

As expected, Git 2.13 is a major update that adds numerous improvements, new features, and countless bug fixes from more than 65 contributors. It's now considered the new stable branch and is a recommended update for all users on all platforms, including GNU/Linux, macOS, and Microsoft Windows. However, this version comes with a security announcement about a vulnerability in "git shell."

"For those running their own Git hosting server, Git 2.13 fixes a vulnerability in the git shell program in which an untrusted Git user can potentially run shell commands on a remote host. This only affects you if you're running a hosting server and have specifically configured git shell. If none of that makes sense to you, you're probably fine," said Jeff King, Open Source Software Developer at GitHub.

Highlights of Git 2.13

Git 2.13's biggest new features include automatic detection of collisions in the SHA-1 hash function that Git uses to identify objects, thus preventing collision-based attacks, implementation of ^ (caret) as a synonym for ! (exclamation point) to allow users to do write the same command but without shell quoting, along with the "attr" token, which lets you select files based on their gitattributes values.

Git 2.13 also introduces conditional configuration includes to Git's configuration system, but for now the only supported condition is matching of the file system path of a repository, makes "--decorate=auto" default option for the "git log" command, and ports git branch's output routines to the ref-filter system that's being shared by the "git tag" and "git for-each-ref" commands so you can use "git branch --format=" to get a custom output.

The "--no-contains" option was implemented in the "git branch," "git tag," and "git for-each-ref" commands so you can ask which Git branches or tags do not have a particular bug/fix, the @{upstream}, @{push} and @{u} special branch names are now case-insensitive, more Git commands can now recurse into submodules and report extra information, and the repository discovery and initialization functionality have been improved.

Download Git 2.13.