git diff
- From
- Carter Lamb <carter.lamb@livetext.com>
- Date
- Jan 13, 2011, 22:46 UTC
- Message-ID
- <AANLkTik7cfu_DS=GS5gz_Tu94NC=ZGi-eA8YXztyd9Ra@mail.gmail.com>
- In-Reply-To
- <AANLkTi=ASvicFGaaDfqxjOxJELWPLKsQwvk7rEeT36Fh@mail.gmail.com>
I use git diff --summary --numstat <commit> to report the files modified, created, and deleted between the current commit and some prior commit. The --stat and --numstat options count the lines added and deleted for each file. Is there a way to report the lines modified for each file. For example:
Given content below for commit 1: aaaaa ccccc
Given content below for commit 2: aaaaa bbbbb ccccc
Given content below for commit 3: Aaaaa Bbbbb ccccc ddddd
git diff --numstat between commits 1 and 2 will report one line added. git diff --numstat between commits 2 and 3 will report three lines added and two lines deleted. I'd like to see the diff between commits 2 and 3 report two lines modified and one line added. Can this be done?
Best, Carter