2

VSCode allows open files from previous commits in comparison editor, is there a way open a file in normal editor, without any comparison? I'd like to have 2 files opened in 2 tabs, one - current working version and another previous committed version.

I do realize I can copy text from comparison editor into a new file, I'm trying to simplify this process if possible.

Destroy666
  • 12,350
vanowm
  • 297

2 Answers2

3

Yes. For example with GitLens extension.

After installing it, on the Commits list in Source Control tab, you can see icons when you hover over a changed file. Example:

Icons

If you hover over the 1st Open File icon as shown on the screen, you can see that clicking it with Alt button will open the file at that revision/commit.

Destroy666
  • 12,350
0

Another solution is Git Graph extension, no need pressing Alt key: enter image description here

However, unlike GitLens, it prepends commit id to the filename, which IMO undesirable, when many tabs are opened the filename might become hidden, another downside is right click menu on the file tab has very limited options.

vanowm
  • 297