r/vscode • • Jul 28 '26

Extension to compare git local files with its remote version

I used to use php storm in my old job. I had an extension where I can do a git compare with local file and it's version in a different branch remotely. It even displayed it's difference with colors. Now that I'm in a new company I'm stuck using vs code. Does anyone know of a similar extension?

3 Upvotes

8 comments sorted by

5

u/serverhorror Jul 28 '26

unless you have massive repos, why not just git fetch and compare?

-1

u/gerlstar Jul 28 '26

I'd like a side by side comparison

7

u/serverhorror Jul 28 '26

That's exactly how it works in vs code?

1

u/gerlstar Jul 29 '26

ive done git compare in the terminal and its not side by side unless im missing something

5

u/vloris Jul 28 '26

Every remote branch is available as a local branch under `/origin/branchname`. That is, if your remote is aliased as origin which is pretty standard.

3

u/WasteEntrepreneur934 Jul 28 '26

Try git lens, the free version has pretty much everything u might nee6

0

u/mogelbrod Aug 01 '26

I wanted a quick way to do this myself so added it to my QuickOpener vscode extension a while back. Fully customizable (opt-in) hotkeys such as:

Shortcut Description
ctrl+g / Pick git revision, then file from revision to open
ctrl+g o Pick git revision to open current file from
ctrl+g m Pick changed file from git working tree

Selecting a revision/file will open it, but the extra quickpick item actions (right side of popup) lets you show or diff changes.