DEV Community

Cover image for Add git blame on Visual Studio Code
Sara Ounissi
Sara Ounissi

Posted on • Edited on • Originally published at thetrendycoder.com

3

Add git blame on Visual Studio Code

When you are working on a project, it is very useful to know the history of the modifications using git. If you are coding on Visual Studio Code like me, you should activate git blame by following these steps :
- Open Visual Studio Code
- Press Ctrl+Shift+X (windows) or ⇧⌘X (Mac)
- Type blame
- Click install on Git Blame

Now, you can see at the bottom of the vs code window who is responsible for the line of code you have your cursor on, as you can see on the image below: line 37 Sara Ounissi (that would be me), pushed this code 1 day ago.

screen shot vs code

However, the aim of this option is not just to see who wrote the code, but why and when. You can click on the name of the person, this will open a pop-in, the button View will then redirect you to the git repository where you will see the whole modification, the name of the commit, etc… Hopefully, that will help you get more context.

git blame vs code

Image of Stellar post

From Hackathon to Funded - Stellar Dev Diaries Ep. 1 🎥

Ever wondered what it takes to go from idea to funding? In episode 1 of the Stellar Dev Diaries, we hear how the Freelii team did just that. Check it out and follow along to see the rest of their dev journey!

Watch the video

Top comments (0)

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay