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 valueauto
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 thegrep.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 supportstag.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.
Community comments
Git 2.1 RPM is available for consumption
by zhang justin,
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