Reputation: 4183
At one point I found a way to show line-by-line Git blame within Visual Studio Code. 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.
Upvotes: 336
Views: 297590
Reputation: 21
Git Blame W77 is a lighweight extension that does what you want. I tested it myself seems to work well.
Upvotes: 1
Reputation: 826
I just installed Git Blame. It's out a while now, but it seems to be lightweight and very easy to use. I was able to get line-by-line details of who and when.
Upvotes: 48
Reputation: 1995
I don't like the way GitLens integrates into Visual Studio Code. After looking around and trying a number of other git-related extensions, I settled on Git History. It can be installed via VSCode Quick Open (typically, Ctrl+P) with ext install donjayamanne.githistory
.
It provides both full file and line-specific git blame from the context menu:
Upvotes: 8
Reputation: 2867
If you use the GitLens plugin, you can also use the "File Annotations" icon in the top right of Visual Studio Code:
Or use the "GitLens: Toggle File Blame" command.
Upvotes: 73
Reputation: 3245
You can view the commit history for an individual file without a plugin using the Timeline view.
See How can I view the Git history in Visual Studio Code? for more information.
Upvotes: 38
Reputation: 12412
On Mac, if you have the GitLens plugin, it's Command + Option + G + B:
Upvotes: 36
Reputation: 3918
Use the Gitlens extension. It supports various options. Once installed, you can use Alt+B to show the full file blame information.
Upvotes: 313
Reputation: 359
Add the Annotator
extension. Here is the marketplace link to add it.
Source code: https://github.com/ryu1kn/vscode-annotator
Upvotes: 21
Reputation: 57
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.
Upvotes: 5