What You Need To Know About The New Git 1.8.3

Nicola Paolucci
Whether you use git
on the command line or via a tool of choice like Sourcetree; whether you host your code on Bitbucket Cloud or on Stash (now called Bitbucket Server) behind your company firewall, if you're like me - wink - when a new git
release comes out it's always a party.
Smooth Upgrade Path For Gitters
The new git 1.8.3 release is out. Of course this means upgrading to the latest version. It should be relatively pain free:
- Just type
brew update && brew upgrade git
if you use homebrew on OSX (due to a last minute bug discovered in parsing.gitignore
on OSX, homebrew hasn't distributed the upgrade yet). - Use a magic apt trick if on Ubuntu based distributions (I leave other distributions as an exercise for the reader).
- Simply run the new installer if on Windows (the Windows port sometimes lags a bit behind so please be patient if you can't find it right away).
For previous notes on git
1.8.2 see here.
So what's new in this release?
As usual lots has been fixed, it seems to me that this drop packs a lot more than the previous cycle. Without further ado, let me then show you a few things that caught my interest.
Colors, Colors And More Polish Everyone
Refinement of the command line UI continues with a few neat updates:
During a
git rebase
session the prompt string generator (incontrib/completion/
) will show how many changes there are in total and how many have been replayed.git branch -v -v
can now paint the name of the branch it integrates with in a different color (color.branch.upstream, defaulting to blue):
npaolucci:~/dev/projects/stash] master ± git branch -v -v
1.3 3a7ec9d [origin/1.3] Merge pull request #765 from STASH-2808-...
gmail-renders 128fe79 [origin/gmail-renders] made pattern DOT_IN_WORD...
* master 66865b0 [origin/master] Automatic merge from 2.4 -> master
git log --format
now sports a%C(auto)
token that tells Git to use color when resolving%d
(decoration),%h
(short commit object name), etc. for terminal output.git count-objects
gained a--human-readable
and-H
option to show various large numbers in Ki/Mi/GiB scaled as necessary:
[npaolucci:~/dev/projects/stash] master ± git count-objects -H
169 objects, 680.00 KiB
Help Shows List Of Guides
git help -g
is a new flag that will list the guides available, just like list of commands are given with -a
:
[npaolucci:~/dev/projects/stash] master ± git help -g
The common Git guides are:
attributes Defining attributes per path
glossary A Git glossary
ignore Specifies intentionally untracked files to ignore
modules Defining submodule properties
revisions Specifying revisions and ranges for Git
tutorial A tutorial introduction to Git (for version 1.5.1 or newer)
workflows An overview of recommended workflows with Git
'git help -a' and 'git help -g' lists available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
Better "Triangular" Work Flow Support
git
now supports a "triangular" work flow for situations where your default process is to always pull from one place and always push to a different one. To accomplish it you can now override configuration variable origin
with a new remote.pushdefault
and override branch.❊.remote
with branch.❊.pushremote
.
Improved Status For Reverts, Rebases and Bisects
git status
has been improved to report when you are in the middle of a revert
session, a cherry-pick
or a bisect
session.
Un-tracking Submodules! Finally.
If you've read my earlier article on git submodule
you have seen that relatively simple operations were not supported too well by the submodule
command line interface. Well there is good news!
Now you can say "I no longer am interested in this submodule" with git submodule deinit
.
Other Nice Things Worth Mentioning
The new
--follow-tags
option tellsgit push
to push relevant annotated tags when pushing branches out.There was no good way to ask "I have a random string that came from outside world. I want to turn it into a 40-hex object name while making sure such an object exists". A new peeling suffix
^{object}
can be used for that purpose, together withrev-parse --verify
.
Conclusions
That's it for now, enjoy the goodies and let me know if there are worthy items I missed in the long list of updates.
As usual follow me @durdn and the awesome @AtlDevtools team for more DVCS rocking.