Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Git-diff Last Two Commits Through TextMate

DZone's Guide to

Git-diff Last Two Commits Through TextMate

·
Free Resource
I believe this is how svn diff operates... but anyway, this alias will allow you to diff the last two commits in Git through TextMate. If you have a theme that supports Diff's then you'll see the differences clearly. Remove the last pipe statement (the mate part) to expose your diff in the console.


alias gitdiff='git log|grep commit|cut -d " " -f2|head -n 2|xargs -n 2 git diff -R|mate'
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}