Suppose I have a file in the LICENSE.txt repository. The content is as follows:
Copyright 2014 MyCompany. All Rights Reserved.
Since my 2015, I changed the year to 2015:
Copyright 2015 MyCompany. All Rights Reserved.
And then put the file
git add LICENSE.txt
Being slightly distracted, I made another change to LICENSE.txt to reflect that another organization is sharing copyright.
Copyright 2015 MyCompany and Affiliates. All Rights Reserved. Copyright 2015 Other Company. All Rights Reserved.
I can see the difference between my working copy and phased copy by running
git diff
And I can see the difference between a phased copy and a copied copy by running
git diff --cached
How to compare a perfect copy (without changing the year) with a working copy (with additional copyright)?
This is just an example. There are cases that are much more difficult when I had to compare what I put with the changes that I subsequently made to the file. A comparison of the contents of the working copy and the phased copy will determine whether I should replace the supplied copy or not.
I am running git 1.9.5 on Windows Server 2012 R2.
source share