Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS / Visual Studio 2015 : how to compare file changes between 2 commits

We're currently testing git as source control for our new projects. We're using TFVC for many years and we're used to the way it works. So far, pretty much everything works as expected but there's something really simple I cannot figure out : in TFVC, it's really easy to get the list of files changed between 2 not consecutive commits :

Commit history TFVC

Files changed between 2 commits

But I found no way to do this with a git repository in VS2015 or with the web interface of TFS2015 update 2 :

Commit history git

I only can compare a commit with his parent commit :

git compare to parent commit

I also found a way to compare an individual file between 2 commits but not the whole repository :

git compare individual file between commits

Is it just me not looking at the right place and if not, why such a basic feature is not implemented ? It's the kind of operation we use daily for review or bug hunting.

I know there's other ways with external tools (GUI and command line) to achieve that but I would want to stay is VS/TFS as much as possible to reduce friction for everybody in the team.

Thanks.

like image 903
mberube.Net Avatar asked Feb 06 '23 23:02

mberube.Net


1 Answers

There is not a way to compare two arbitrary commits in Visual Studio 2015. However, this functionality will be included in Visual Studio 2017.

In Visual Studio 2017 it will be possible to get the changes between two different commits. This functionality can be accessed via selecting two commits on the history page and choosing the "Compare Commits..." command:

Compare Commits entry point

This functionality is present in the preview releases of Visual Studio 2017, so you can try it out and see if it is what you are looking for.

like image 77
jamill Avatar answered Feb 08 '23 16:02

jamill