GitLens is a fantastic VS Code extension that allows you to explore and navigate your Git history with pinpoint precision.
GitLens works by embedding all types of useful information directly in your code (only in development). For example, you can see who, when, what, and why other developers have made changes to any file in your project.
Install GitLens
To install GitLens, go to the Extensions Marketplace inside Visual Studio Code and search for “GitLens”, and click install.
You can use this keyboard shortcut to open the Extensions tab in VS Code:
- Cmd + Shift + X on Mac
- Ctrl + Shift + X on Windows
GitLens works as soon as you have installed it. No setup is required.
After installing GitLens, you‘ll notice there’s an extra tab on the left sidebar in VS Code. Inside this tab, you can easily explore and navigate your Git history:
GitLens especially useful if you’re working in a team, but it’s also helpful to see what a developer did and why, for example, if you’re working with a boilerplate repository.