BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

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

Bookmarks

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
Style

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.

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

Community comments

  • Git 2.1 RPM is available for consumption

    by zhang justin,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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: github.com/schnell18/packaging/tree/master/git

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

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

BT