At one point I found a way to show line-by-line git blame within vscode. I now cannot recall or find the means with which to do that. I have the Git Blame extension, but that only shows blame on a single selected line.
7 Answers
Use Gitlens extension. It supports various options. Once installed, you can use Alt+B to show full file blame information.

- 37,270
- 24
- 156
- 208

- 3,007
- 2
- 19
- 37
-
129So they implemented a ton of functionality but not git blame natively? – apanzerj May 21 '18 at 22:29
-
22Or Ctrl+Shift+G B, if ones gitlens keymap is configured as 'chorded'. – vlad2135 Jan 24 '19 at 12:01
-
13At least on macOS there is a "Show File Annotation" icon in the top right corner. That toggles a bar showing the blame for each line. – Manuel Jul 11 '19 at 23:09
-
8Where do you see "Show File Annotation"? I can't find it. Do you use a plugin for this? – Pieter Meiresone Jul 14 '19 at 09:01
-
10Once GitLens is installed, it also puts a little circular GitLens icon on the right of the tab bar (icon matches that for the extension in the left-hand activity bar). Clicking that will also show/hide the file blame area. – Sam Oct 31 '19 at 12:36
-
2"Show File Annotation" is definitely not here on macOS VSCode 1.50.1. The devs of VSCode itself didn't want people tracking them down from its source code and blaming them for issues like this, so they conveniently 'forgot' to include it :-P . – ijoseph Oct 18 '20 at 20:58
-
5does anybody know hot to change the annotations panel's width? It takes 2/3 of widths in my case which is not nice – YakovL Feb 25 '21 at 10:31
-
Not sure if it has always been like this, but the full name is "_GitLens — Git supercharged_". Not to be confused with "_GitLens (Insiders)_" – Trisped Jun 29 '21 at 21:08
-
3LOL, this overbloated GitLens extension cannot basically show annotations with authors. They can't be serious! Hey, go and checkout WebStorm/IDEA to see how it should be done. – Onkeltem Jan 31 '22 at 09:55
-
Where do I have to press `Alt+B`? In the file? Does not open or show anything. – questionto42 Nov 02 '22 at 19:25
-
3The GitLens' annotations panel is absolutely disgusting. Looks horrible, takes 2/3 of the screen, doesn't show user names, lacks color codes indicating when changes were done. Webstorm/Intellij do it sooooo much better. – Michał Jabłoński Nov 30 '22 at 11:01
-
I really tried to like GitLens. It's just bloated, and takes a lot of previous screen space. Sure, it can do a lot, but you cannot do anything else with the editor. Combined with the fact that vscode cannot be split on two monitors, it's just not efficient to use. – Eric Duminil Feb 18 '23 at 14:04
-
4
-
2To install GitLens, type `Command + Shift + X`, search "GitLens", click "install" – akki Oct 08 '21 at 19:48
-
2Thank you. For anyone else who infrequently uses VS code like myself who was struggling to remember how to access the Command Palette pictured above, it's `Command + Shift + P` – David Hughes Nov 12 '21 at 16:17
-
2I have GitLens installed and `Command` `Option` `G` `B` does nothing. – Snowcrash Nov 01 '22 at 09:57
If you use the GitLens plugin, you can also use the "File Annotations" icon in the top right of vscode:
Or use the "GitLens: Toggle File Blame" command.

- 6,024
- 2
- 37
- 34

- 1,992
- 1
- 15
- 14
-
-
-
@Black you might not be in a git repo. i just tried: (1) new project: no icon. (2) `git init`: no icon. (3) git add and commit: no icon. (4) close and re-open that file: now the icon shows up as on the screenshot. (i am on the currently latest `v13.6.0`) – omnesia May 26 '23 at 15:33
Add the annotator
extension. Here is the marketplace link to add it.

- 4,255
- 3
- 15
- 31

- 159
- 1
- 8
-
possible usage: `ctrl + shift + p`, type `annotator` (or less), choose "Annotator: Annotate the current file or ...". Unfortunately (Annotator 1.0.0, VS Code 1.53.2), the annotated view is opened separately, with no syntax highlighting, block folding, scrolled to the top of the file and `ctrl + g` not working to go to the line – YakovL Feb 25 '21 at 10:25
You can view commit history for an individual file without a plugin using the Timeline view.
See https://stackoverflow.com/a/60013101/337934 for more information.

- 2,621
- 4
- 34
- 39
-
6But you can't view what commit a particular line was a part of directly – Ridhuvarshan Jun 06 '22 at 17:03
-
2@Ridhuvarshan yup, that is correct, but I didn't want to install another VSCode plugin and this was "good enough" for my case – SamB Dec 07 '22 at 19:16
-
1The question asks for a "git blame" equivalent: "show line-by-line git blame within vscode". You are giving a "git log" equivalent. – memoselyk Jan 19 '23 at 14:13
I know I'm late here and this is an old question, but, I just installed Git Blame, it's out a while now but seems to be lightweight and very easy to use, I was able to get line by line details of who and when.

- 476
- 5
- 11
-
5This looks much better, and simpler. GitLens is completely overbloated. – Eric Duminil Feb 18 '23 at 14:26
-
Can you share how you got this to show like key combinations or whatever else it took? – mLstudent33 Jun 01 '23 at 08:56
GitLens provides the functionality of full-file git blame. To execute the command:
Press Ctrl+Shift+G, followed by pressing only B.
Note: When pressing B, do not press the Ctrl and Shift buttons. The command will work correctly in this manner.
I have personally validated this command on VS Code version 1.81.0 and GitLens version 14.2.0. Some users have reported issues with this command, but it's possible they are inadvertently pressing Ctrl and Shift buttons while pressing B.

- 17
- 12