VSCodeGitLens - How to visualize the project history in your editor

Domenico SolazzoDomenico Solazzo | Developer & Engineering manager

Domenico Solazzo

 - undefined min

You are usually working with other developers in projects while sharing your code using Git.

It is a good thing that if you can keep track of the Git history while developing in your editor. You could double check who modified a particular file last, compare the file with previous version of the same file and so on.

Gitlens

I use Visual Studio Code for my daily coding. So, how would you do that?

Enter GitLens

“GitLens supercharges the Git capabilities built into Visual Studio Code.”

GitLens offers visualization of code authorship, navigate and explore git repositories, and then gain insights via powerful comparison commands.

You will be able to go back through history and gain further insights and see how your code evolved. Evolution of your codebase is important when you are introduced to a new codebase as developer: what to why other developers arrived to the current version of that particular code.

Gitlens

Some of the features offered by GitLens (from the GitLens website):

  • 🦄 a GitLens History explorer: It will let you navigate file histories in your project.
  • 🦄 Authorship: It will show the most recent commit. It will also show the number of authors for a given code block.
  • 🦄 Gutter blame: You will have annotations, including a heatmap, for the whole file
  • 🦄 Commit search: You will be able to search commits by message, author, filename, commit id
  • 🦄 and so much more

Thanks to GitLens you will understand your code better and it will help you to have a glimpse into whom, why and when a line of code was changed.

Which extensions are you using with your own editor?

FOLLOW ME

Do you know that I have a YouTube channel? Subscribe!

Where can you find me?

Where you can find me online