Skip to main content

Command Palette

Search for a command to run...

Compare Different Branches In Visual Studio Code

Updated
Compare Different Branches In Visual Studio Code

In this post, I'll show how to search and compare different branches in VS Code. This is an easy and straight forward procedure using a Vscode extension.

Shortest Way

git diff master..feature

Smart Way

In this method, we're using a Vscode extension called Gitlens to search and compare two branches. You can use the same method for comparing two commits.

Requirement

image.png

How it Works GIF

Gitlens-Search & compare.gif

Step by step

  1. Click Source Control & select SEARCH & COMPARE from your VS Code

  2. Click on Compare References

  3. Select the branches you want to compare

  4. Now, you can compare the files from the different branches

image.png

Feel free to reach out to us for any website or software development needs. If you enjoyed our content, don’t forget to explore our products as well!

References

Let's connect,

More from this blog

M

Makeinfo Blog | Tech Guides, SEO Tips, and Marketing Automation

127 posts

Blogging helpful tech tips, how-to tutorials since 2020