How to compare Current File with old Version in GIT (Visual Studio 2013)

git tfs compare

git tfs compare

You can compare a file with its previous version quite easily using git. You can do that either in Visual Studio 2013 (if you have Git Source Provider Extension installed) or even better you can use SourceTree ( a free software) which provided additional benefit of merging the two version if need (using reverse hunk).

SourceTree Diff Tutorial

Select all files from the dropdown box in source tree, look for the file you are interested in.  Right click on the file, select “Log selected”. This will give you history of the file. Highlight any two revision in this window, you will get the difference (diff) of the two revisions. You can select current version vs any old version or two old versions to compare.

Git Visual Studio 2013 Diff

If you have installed Git Source Provider Plugin, you can right click on the file and select “view History”. Here you can do the same, select any tow revisions and the right click while selecting on of them and select compare.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*