Git 2.1 Released: What's New

| by Sergio De Simone Follow 17 Followers on Aug 26, 2014. Estimated reading time: 1 minute |

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

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Git 2.1 RPM is available for consumption by zhang justin

If you want to try the Git 2.1 and don't like compile it from scratch, you may try this RPM package which based on the one from Fedora project. It fixes the circular dependencies between the git and perl-Git package. It also includes some sensible system-wide git configuration. For example this RPM set "tag.sort" to "version:refname" as described in Tags ordering in this article. It also defines some use full alias as such "issues" which list the tickets associated with a particular branch or set of commits.

Go ahead to get source RPM on github at this URL:

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you