dim – visualize your Git diff in TextMate

I use git as my primary version control system and one nice alias that I have in my ~/.bash_profile is “dim”. When I type in “dim”, I see my Git diff within TextMate which makes it easy to see what I’m about to commit.

Here’s the entire source:
alias dim="git diff | mate"

It should automatically pick the “Diff” language for you, but if not, then just pick it from the chooser at the bottom of the window to get the nice highlighting where deleted lines are in red, added lines are in green and markers are in blue.

3 Replies to “dim – visualize your Git diff in TextMate”

  1. You should use GitX. You can see the files that have changed, easily navigate between files to see each diff, easily discard changes you don’t want, construct your commit message and even amend the previous commit. It’s an awesome tool:


Comments are closed.