Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Git 2.1 Released: What's New

Git 2.1 Released: What's New

Leia em Português

This item in japanese

Lire ce contenu en français

Two-and-a-half months after Git 2.0, a new version of Git has been released. Though a minor update, the list of new features and improvements is large.

The complete release notes can be found on git repository and provide full details about what can be found in Git 2.1. What follows provides a minimal selection of new features in Git 2.1.

  • Better bash completion

    Bash completion has been extended to "better handle aliases that define a complex sequence of commands." In other words, if you define an alias which pipes the results of a git command into, e.g., grep, sort or any other command line program, then autocompletion for the alias will produce the same options as if it were the original git command.

  • Decorated log "auto" option

    The log.decorate configuration variable now understands the value auto to enable the --decorate option automatically when the output is sent to tty.

  • Support for vimdiff3 for merging

    The git mergetool command now supports vimdiff3 backend.

  • Support for full pathname output in git-grep

    A new --full-name option allows to get results showing full pathnames, instead of pathnames relative to the current directory. It is important to observe that this behaviour is now the default: "git grep learned the grep.fullname configuration variable to force ‐‐full-name to be the default. This may cause regressions for scripted users who do not expect this new behaviour."

  • Tags ordering

    Git-tag now supports tag.sort configuration, "to be used as the default sort order when no ‐‐sort= option is given." A good example of the usefulness of this new feature is provided by Tim Pettersen on Atlassian Blog, who suggest the following default sort to take into account version numbers in tags:

    $ git config --global tag.sort version:refname

    By setting the above default option, git tag will correctly order version numbers without requiring any specific sort option to override its default lexicographically ordering.

The new Git version also contains several changes aimed at improving performance and a bunch of bug fixes. More details can be found in the full release notes. The above mentioned article by Tim Pettersen is also worth reading since it collects his thoughts on "some aspects of the release that got us excited at Atlassian" and more extensive examples.

Rate this Article