skip to Main Content

In TFSVC, I was able to open a changeset and view the differences in files by using the following command, for example: TF changeset 111111.

I would like to achieve the same functionality with Git. It doesn’t necessarily have to be within the Visual Studio IDE; I would be satisfied if I could do this in tools like VS Code or Fork as well. Currently, I’m using git diff for this purpose, but I find it slower to manually navigate through files in the command line compared to using an IDE.

Below is the functionality in visual studio

enter image description here

2

Answers


  1. To see the differences for individual files, first and most importantly, make sure that you are on a clean working directory already (meaning that you have either committed or stashed your most recent changes).

    You can run the command, git reset <blob> (replace <blob> with the actual commit ID from a previous blob). Then, run git status to see all of your changes since that blob.

    With your list of file names, you can copy any file name and then paste it into the following command where <fileName> is: git diff <fileName>.

    When you’re done looking at changes, you can do a hard reset, using git reset --hard <blob>, to return to the blob which you came from.

    Login or Signup to reply.
  2. Find your commit in the git history graph
    See https://learn.microsoft.com/en-us/visualstudio/version-control/git-browse-repository?view=vs-2022#browse-through-local-and-remote-branches

    And after that it’s as easy as double clicking to see commit details.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search