Go back in time 🔮
Blazing fast ⚡️
Inline blame 🏁
Diff interactively 📝
Git online 🌎
User friendly 🐶
Line history 📜
Search 👀
Custom urls 🧤
Features 🎞️
- Command palette: ⌘↑p, "Git Blame: ..."
- Search menu (or command palette).
- Line history menu (or command palette).
- File history menu to see how the file evolved over time.
- Document history menu to see how the file contents evolved, including renames.
- Log or reflog menu.
- And much more.
Developers 🧑🏾🦱
package.json
{ "extensionDependencies": ["solomonkinard.git-blame"] }
Get the commit id for the current line.
const id: string | undefined =
await vscode.commands.executeCommand("gitBlame.getShaForCurrentLine");
console.log(id);
Get the git commit ids whenever a line is focused.
vscode.commands.executeCommand("git-blame.commands.onShaForCurrentLine",
(ids: string[]) => console.log(ids));
Get the git commit ids whenever a file is focused.
vscode.commands.executeCommand("git-blame.commands.onAllShasForFile",
(ids: string[]) => console.log(ids));
Get the git commit ids for the file.
const ids = await vscode.commands.executeCommand(
"git-blame.commands.getAllShasForFile");
console.log(ids);
Get the commits for the file.
vscode.commands.executeCommand(
"git-blame.commands.onShaListingIndexedByLine",
(shaForEachLine: string[]) => console.log(shaForEachLine));
Get commits for the commit ids.
const shaToCommitMap: Map<string, Commit> =
await vscode.commands.executeCommand("git-blame.commands.getAllCommits");
console.log(shaToCommitMap);
Commit type:
interface Commit {
sha: string;
date?: string;
author?: string;
mail?: string;
summary?: string;
previous?: string;
}