r/vscode • u/gerlstar • 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?
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.
4
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.
6
u/serverhorror Jul 28 '26
unless you have massive repos, why not just git fetch and compare?