Vijender Kumar
Vijender Kumar

Reputation: 1475

Is there an IntelliJ-like feature "Compare with branch" for Visual Studio Code

I was wondering if there is an extension for Visual Studio Code which enables us to compare any arbitrary file in current branch with the same file in another branch. In Intellij, there is a 'compare with branch' option using which I can compare the state of my file in current branch with the same file in any other branch. This comes in handy a lot of time and I don't have to go to GitHub if I want to compare the changes done with the target branch prior to creating a pull request.

Upvotes: 4

Views: 3786

Answers (1)

user2846469
user2846469

Reputation: 2220

Yes the GitLens extension gives you the possibility to do this via:

Explorer Context Menu > Open Changes > Open Changes with Branch or Tag...

enter image description here

i.e. open the context menu for the file (on Windows right-click on the file) you want to compare and choose the above from the context menu. Then enter the branch you want to compare to.

Upvotes: 3

Related Questions