Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
color your word - Bart's Blog
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Peter Teoh  
View profile  
 More options May 6 2008, 11:30 am
From: Peter Teoh <htmldevelo...@gmail.com>
Date: Tue, 06 May 2008 23:30:07 +0800
Local: Tues, May 6 2008 11:30 am
Subject: color your word - Bart's Blog

http://www.jukie.net/~bart/blog/color-your-word

color your word

[ link: color-your-word | tags: git | updated: Sat, 12 Apr 2008 10:27:39 ]

I just discovered a git feature that has eluded me since v1.4.3, when it was introduced. It's a way to colour differing words in git diff output. Maybe you don't know about it either... allow me demonstrate:

Let's initialize a simple tree:

    # git init
    # echo some existing text > file
    # git add file
    # git commit -m"some commit" file
    # echo some changed text and some new > file

So now we have a tree with a file that contains one word altered.

Here is a comparison of git-diff with and without the --color-words option:

git-diff file

git-diff --color-words file


  git-diff-plain.png
2K Download

  git-diff-color-words.png
2K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »