Git Up! 10 Reasons to Upgrade Your Old Git Installation
Published on Wednesday, May 27, 2009 in gitGit has seen a huge influx of newcomers over the past year. Many folks installed Git as they read through their first tutorial, got it working, and are still using that same trusty installation today. But rest assured, Git has not been standing still.
If you installed Git a year ago (perhaps when Rails made the move in April of last year), you would've grabbed v1.5.5. The Git team has cranked out five feature releases since then, full of usability improvements, a few new tricks, and, of course, numerous bug fixes. So it's time for some spring cleaning of your dusty old Git installation.
If you're not yet sportin' the 1.6.3 hotness, here are ten reasons to Git up!
- Everyone's crazy-fast VCS is even faster:
git cloneandgit mergehave been rewritten in C. [1.5.6] [1.6.0] - Viewing your staged changes no longer requires a cheatsheet in order to remember the command:
git diff --stagedserves as a substantially-more-obvious synonym togit diff --cached. [1.6.1] - Stashes always remember where they came from and make it easy to get back there:
git stash branch <branchname> [<stash>]creates a new branch starting at the commit at which the stash was created, checks out the branch, and applies the stash. The stash is guaranteed to apply cleanly, no matter how much the rest of your fast-movin' repo has changed. [1.6.0] If you mistype a command, Git offers a helping hand: Clippy says, "It looks like you're trying to use SVN." [1.6.1]
$ git stat git: 'stat' is not a git-command. See 'git --help'. Did you mean this? statusBranch navigation adopts basic filesystem navigation idioms: Use
git checkout -to return to the last branch you were on. [1.6.2]A visualization of the ancestry tree is available without having to leave your terminal:
git log --graphoutputs hot ASCII graph pr0n in full technicolor. [1.5.6] [1.6.3]Getting a quick, lean log from the command line now requires less typing (and no forced compliments).
git log --onelinereplaces the need to use its older, more verbose cousin,git log --pretty=oneline --abbrev-commit. [1.6.3]Speaking of things that are easier to type, reaching all the way over to hold down that cockamamie Shift key is hard work. Give yourself a break: If you're on OS X, you no longer need to type "HEAD"; "head" works just the same. [1.5.6]UPDATE - As much as I enjoy that vacation from the Shift key, apparently it is unintended behavior and "may even be considered a bug." (Thanks to Junio Hamano for providing the inside scoop.) Allow me to present an alternate: Tidying up your list of remote branches is now possible with a single command:git remote update --prune $remotefetches updates for the named$remoterepository (e.g., "origin") and prunes any stale tracking branches that you have lying around for that$remoterepo. [1.6.3]Searching for content no longer means scanning line after line to locate the matching text:
git grepnow highlights the matches in color. [1.6.3]The science of Branchology added a few handy new instruments: Use
git branch --no-mergedto list the branches that have not yet been merged into the current branch. Usegit branch --mergedto see just the opposite. [1.5.6]
And this is by no means an exhaustive list. An upgrade from v1.5.5 to v1.6.3 includes well over 100 improvements. While no one of these improvements is revolutionary, they each make this awesome VCS just a tad nicer. And collectively, they make it well worth the upgrade.
So what are you waiting for? Invest five minutes right now to upgrade. C'mon. You're sittin' around reading blogs. What else have you got to do? Git up!
--
Notes
If you're on OS X, I recommend using MacPorts for quick and easy upgrades. Let Rob Sanheim show you the way.
Image courtesy of Midnight Digital (flickr.com/midnight-digital). [Creative Commons License]
Archive
Now that you've whetted your appetite with the most recent post, perhaps you'd care to dig into the archive.
- RailsConf 2009: JavaScript Testing in Rails Projects. No, Seriously! Published on Tuesday, March 24, 2009
- Developer Day: Evolving Your Git Workflow, and Much More Published on Thursday, March 12, 2009
- Git Tip: How to "Merge" Specific Files from Another Branch Published on Wednesday, February 25, 2009
- TextMate Oldie But Goodie Wrap-up Published on Tuesday, December 02, 2008
- Grails vs. Rails: Are we seriously still talking about this?! Published on Tuesday, November 18, 2008
- A Month of TextMate Productivity Tips Published on Tuesday, November 04, 2008
- Testing Anti-Patterns Potpourri - Quotes, Resources, and Collective Wisdom Published on Tuesday, October 07, 2008
- Audio, Video, Slides: How to Fail With 100% Test Coverage at raleigh.rb Published on Tuesday, September 09, 2008
- Grails Presentations Open Sourced on GitHub Published on Wednesday, September 03, 2008
- Testing Anti-Patterns: Invisible Code Published on Monday, August 18, 2008
- Testing Anti-Patterns: The Ugly Mirror Published on Wednesday, July 30, 2008
- Noteworthy Nonsense - July 25, 2008 Published on Friday, July 25, 2008
- iPhone App Store Now Live Published on Thursday, July 10, 2008
- Testing Anti-Patterns: Underspecification Published on Tuesday, July 08, 2008
- 5 Resources for Getting Up to Speed on Rails 2.1 Published on Tuesday, July 08, 2008
- Testing Anti-Patterns: Overspecification Published on Tuesday, July 01, 2008
- Testing Anti-Patterns: Incidental Coverage Published on Tuesday, June 17, 2008
- A Brief Discussion of Code Coverage Types Published on Tuesday, June 10, 2008
- Book Review: Rails Security Audit Published on Thursday, May 29, 2008
- Video: Grails Presentation at QCon San Francisco Published on Tuesday, May 20, 2008
- What's Under Your Monitor? Published on Friday, April 25, 2008
- git init: Say Hello to Agility Published on Tuesday, April 22, 2008
- history meme Published on Wednesday, April 16, 2008
- Noteworthy Nonsense - April 4, 2008 Published on Friday, April 04, 2008
- Interview at Groovy Zone Published on Thursday, April 03, 2008
- Getting Started with Grails: The Jasper Reports "Expansion Pack" Published on Wednesday, April 02, 2008
- Noteworthy Nonsense - March 18, 2008 Published on Tuesday, March 18, 2008
- Manning up: TextMate Meets Man Pages Published on Friday, March 14, 2008
- High Marks for Refactotum 2GX; Next Stop RailsConf Published on Friday, March 14, 2008
- Noteworthy Nonsense - March 9, 2008 Published on Sunday, March 09, 2008
- Lightning Talks at Tonight's Agile RTP Meetup Published on Monday, March 03, 2008
- Groovy Recipes: Greasing the Wheels of Java Published on Wednesday, February 27, 2008
- Getting Started with Grails: The Acegi "Expansion Pack" Published on Tuesday, February 26, 2008
- Refactotum: 2GX Edition Published on Sunday, February 24, 2008
- test/spec/rails => You Bettuh Recognize Published on Friday, February 08, 2008
- Grails Goes 1.0 Published on Tuesday, February 05, 2008
- Podcast Interview with aboutGroovy.com: The Sequel Published on Monday, February 04, 2008
- Programming Groovy: Metaprogramming No Longer an Afterthought Published on Saturday, January 19, 2008
- 2GX - Next-Gen Java Conference Is Right Around the Corner Published on Thursday, December 20, 2007
- Getting Started with Grails: Now Available in Chinese Published on Sunday, December 16, 2007
- Making acts_as_solr Act As Deployable Published on Monday, November 26, 2007
- Relevance is Hiring! Published on Saturday, November 03, 2007
- RubyConf.new('2007').observe(:order => :random) Published on Friday, November 02, 2007
- Evan Phoenix on Testing Private Methods in Ruby Published on Friday, November 02, 2007
- Web 2.0 Meetup in NYC Tonight: The Prophecy of Grails Published on Monday, October 22, 2007
- First International Grails eXchange is Underway Published on Wednesday, October 17, 2007
- EJB3 Domain Classes Presentation at Grails eXchange: Slides, Sample Code, & Rampant Agnosticism Published on Monday, October 15, 2007
- Slides from Northern Virginia Java Users Group Presentation Published on Thursday, October 11, 2007
- Streamlined 0.9 Released - Stop banging rocks together and build something! Published on Thursday, September 13, 2007
- Interview with WebDevRadio Published on Tuesday, September 11, 2007
- Grails 0.6 Released, Brings New Flow to Grails Development Published on Sunday, September 02, 2007
- Tonight at Agile RTP: Matthew Bass on "Chaotic Agility" Published on Tuesday, August 07, 2007
- Joining Relevance Published on Wednesday, August 01, 2007
- Grokking GORM - Part 3: Pimp My EJBs Published on Sunday, July 22, 2007
- Grokking GORM - Part 2: No Schema Left Behind Published on Saturday, July 21, 2007
- Grokking GORM - Part 1: Conventional Thinking Published on Friday, July 20, 2007
- Groovy 1.1-beta-2 Released, Introduces Joint Compiler for Java & Groovy! Published on Thursday, July 05, 2007
- Streamlining Your Way to Rails Published on Sunday, June 24, 2007
- InfoQ Review: Groovy in Action Published on Wednesday, June 13, 2007
- Upcoming Grails Presentation at the RTP JUG Published on Tuesday, June 12, 2007
- Slides from Princeton Java Users Group Presentation Published on Thursday, June 07, 2007
- Groovy + Grails Double-Header at Princeton JUG Published on Wednesday, May 30, 2007
- GSwG Source Code Now Updated for Grails 0.5 Published on Saturday, May 19, 2007
- JavaOne Day 4, Part 2: You don't have to go home, but... Published on Sunday, May 13, 2007
- JavaOne Day 4, Part 1: Where Do Standards Come From? Published on Sunday, May 13, 2007
- JavaOne Day 3, Part 2: Groove On! Published on Saturday, May 12, 2007
- JavaOne Day 3, Part 1: Mash-up your languages, Mash-up your web apps Published on Friday, May 11, 2007
- JavaOne Day 2, Part 3: Solutions for Sanity Published on Friday, May 11, 2007
- JavaOne Day 2, Part 2: An Afternoon of Rich UIs Published on Thursday, May 10, 2007
- JavaOne Day 2, Part 1: Breakfast of Champions Published on Thursday, May 10, 2007
- JavaOne Day 1: java.util.Random Observations Published on Wednesday, May 09, 2007
- JavaFX Mobile = iPhone - Cool Published on Wednesday, May 09, 2007
- JavaOne Day 0: San Francisco Gets Groovy Published on Tuesday, May 08, 2007
- JavaOne Preloaded: A Groovy/Grails Special Event Published on Tuesday, May 01, 2007
- Grails 0.5 Shipped: The Cup Overfloweth! Published on Tuesday, May 01, 2007
- Groovy 1.1-beta-1 Released - Takes Java Integration to the Next Level Published on Monday, April 30, 2007
- Slides from Virginia Java User Group Presentations Published on Wednesday, March 21, 2007
- Virginia Double Header: Upcoming Grails Presentations in Norfolk and Richmond Published on Wednesday, March 14, 2007
- Getting *Updated* with Grails - Updated Source Code Available for Grails 0.4.2 Published on Tuesday, March 13, 2007
- Grails Is on the Move Published on Monday, March 12, 2007
- Tag! Here Goes... Published on Monday, March 05, 2007
- Grails eXchange 2007 - Coming to a London Near You Published on Saturday, March 03, 2007
- Slides from Charlotte Java User Group Presentation Published on Thursday, February 22, 2007
- Upcoming Grails Presentation at Charlotte JUG Published on Wednesday, February 14, 2007
- Podcast Interview with aboutGroovy.com Published on Wednesday, February 14, 2007
- ExpandoMetaClass Teaches an Old Dog New Tricks Published on Friday, February 02, 2007
- Major UK Brand Launches Grails-based Site Published on Thursday, February 01, 2007
- Grails 0.4 Hits the Street Published on Wednesday, January 31, 2007
- Slides from Philadelphia Spring Users Group Presentation Published on Wednesday, January 24, 2007
- Just Released: Getting Started with Grails Published on Wednesday, January 17, 2007
- Upcoming Grails Presentation in Philadelphia Published on Friday, January 12, 2007
- Out of the Box Grails + JEE Integration Published on Monday, December 18, 2006
- Podcast Interview: Grails 0.3 Release, Upcoming Book, and More Published on Friday, November 17, 2006
- Getting Groovy with TextMate Published on Thursday, November 02, 2006
- Screencast: From Zero to Grails in Under 4 Minutes Published on Sunday, September 17, 2006
- Java Posse Recommends Grails + EJB3 Article Published on Sunday, September 10, 2006
- Grails + EJB3 Article on InfoQ Published on Tuesday, August 22, 2006
- Podcast Discusses Legacy DB Support in Grails Published on Monday, August 14, 2006
- Hoisting Grails to Your Legacy DB Published on Tuesday, June 20, 2006

