23

I've been trying to move over to Visual Studio Code from WebStorm but WebStorm still has this one killer feature that I can't see how to do in Visual Studio Code.

I can quickly pull up a list of my commits and then diff any one of them:

enter image description here

enter image description here

Please tell me Visual Studio Code has a way of doing this?

Milan
  • 123
Evanss
  • 1,268

4 Answers4

15

Yes, it has built in git integration. Please refer to this tutorial. There are also plethora of extensions, like Git History and Git Project Manager

Git History extension result

igrinis
  • 468
  • 2
    Its similar but I cant see a way of diffing by a commit rather than by a file. – Evanss Oct 04 '17 at 10:30
  • 3
    After you install Git History extension, you will get this ability. Command-Shit-P, select Git: View History (git log). You will see all the commits, much like in your first picture. Then you can select the (commited) version you want to compare to. – igrinis Oct 04 '17 at 11:59
  • 2
    You should summarize the content of those links in your answer to answer the question more specifically. – Michael Fulton Dec 30 '21 at 18:10
8
  1. Install the GitLens extension (or it's already installed by default)
  2. Go to the GitLens tab in the sidebar
  3. Find the row 'Search Commits'
  4. Enter the commit SHA

You'll see all files that were changed in that commit.

click to see photo!

Worthwelle
  • 4,648
3

On Windows or Mac:

Ctrl + Shift + G

Then click on the "M" (short for Modified) next to the file that you wish to view diffing on.

ihodonald
  • 131
0

For SVN you can use the extension called "SVN-EXT".

enter image description here

joan16v
  • 177