Supercharge Your Git Workflow with the GitLens VS Code Extension
Tags: vscode, git, gitlens
Published: 2020-09-01 12:36:29

---
title: Supercharge Your Git Workflow with the GitLens VS Code Extension
published: true
date: 01/09/2020
tags: vscode, git, gitlens
canonical_url: https://www.jamesqquick.com/blog/supercharge-your-git-workflow-with-the-gitlens-vs-code-extension
cover_image: https://cdn.sanity.io/images/rx426fbd/production/277df765a73c9bb6fb21e396d3b27186eab64644-1920x1080.png
---

{% youtube C6wMNoe78oc %}


The other day, I saw a list of GUI tools for working with Git, and I thought, what about VS Code?

VS Code already has amazing built-in support for Git, but it also has a vast ecosystem of extensions. In this article, let's take a look at the one extension that will **supercharge your Git workflow in VS Code** , [the GitLens Extension](https://gitlens.amod.io).

 ![](https://cdn.sanity.io/images/rx426fbd/production/a76d0b2a33ef4ec4aed3a98456f5d2b4f1efdc91-3770x1824.png)
## How to Install

To install the extension, open the extension panel inside of VS Code and search for GitLens and then click install.

 ![](https://cdn.sanity.io/images/rx426fbd/production/739c080a5e5fb60a015fa6fafd8307cf4b2aef5e-3356x2096.png)

Once you install, you'll have a new menu item in the sidebar with lots of options. We'll get to those more in a minute.

 ![](https://cdn.sanity.io/images/rx426fbd/production/0ce2d78a00b198119444f7fd9241843b80f3d0fc-1134x2096.png)
## Blame Information

This extension provides simple Git blame information, who wrote the code, when they committed, etc. By default, you can see this in two different places, alongside the code, and on the bottom bar.

 ![](https://cdn.sanity.io/images/rx426fbd/production/a07748bb29b41b5f47377bdae3f5add55e2036ec-2678x1068.jpg)

It's pretty useful to see this info at a glance. In addition, if you hover over the blame info you get a context menu with some extra info including a button to view the commit.

 ![](https://cdn.sanity.io/images/rx426fbd/production/f23f5ed46e960136d7d2d1af784f5c2c20f31b94-2366x1542.png)

## File and Line History

You also have the ability to view and compare Git history by file and even by line in the sidebar menu. This menu is contextual, so it will pull up information about the file and line you currently are on in the editor itself.

 ![](https://cdn.sanity.io/images/rx426fbd/production/51b7d40dd1362f7904fd91fa2fc315af9f3a77bd-3178x1192.png)

From there, you can also pull up a diff comparing that line or file vs the previous commit. This is incredibly handy to quickly see what has changed.

 ![](https://cdn.sanity.io/images/rx426fbd/production/b584ab7c74ca0cb76c30dfd2c1036e5e8dc3c4f8-3836x2160.png)

## Search Commits

Another great feature is the ability to search through commits. You've got several different options to search by.

- message
- author
- commit
- file
- changes

 ![](https://cdn.sanity.io/images/rx426fbd/production/73f9b9c82beba4d0a8197e32588fbda3a2605060-3834x2160.png)

This is by far the easiest way I've found to search through commits.

## Customization

There are also lots of customization options for this extension. There are too many to list them all out, but here are a few that I found useful.

- **Blame: format** - customize how your blame messages look
- **Headmap:Enabled** - toggle on a visual heatmap to show how recently code has changed (you can also customize the heat colors!)
- **Hovers > Annotations:Enabled** - toggle whether you want the additional details when hovering on a blame message

Again, there are so many options. I suggest scrolling through and taking a look. You can find them in your VS Code settings Window.

 ![](https://cdn.sanity.io/images/rx426fbd/production/ff18c1df56b1a3545bb5ab6fa09dfdabf073cc7f-3834x2158.png)
## Other Commands

There's so much this extension can do, that you'll honestly just have to take a look for yourself. I would suggest opening the command palette (`CMD+Shift+P` on Mac and `CNTRL+SHIFT+P` on Windows), searching `GitLens,` and scrolling through the available commands.

 ![](https://cdn.sanity.io/images/rx426fbd/production/8ab6499992e00c161688d3bf5ad6d2ad06392639-1732x886.png)

This extension does a ton, so it's worth just poking around to see what's useful.

##