ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Git blame

by frou ST3

Show Git blame information while viewing a file in Sublime Text

Labels git, blame

Details

Installs

  • Total 52K
  • Win 10K
  • Mac 27K
  • Linux 15K
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7
Windows 2 1 1 3 0 0 2 0 0 2 1 0 1 0 3 2 1 1 0 0 1 2 1 1 2 2 0 0 1 2 2 1 1 1 0 3 2 1 1 0 4 0 1 1 1 1
Mac 1 0 1 9 1 3 2 0 0 4 2 0 0 2 3 1 7 6 4 0 4 2 3 2 2 2 0 3 5 5 7 4 2 3 3 7 4 7 4 0 0 3 5 4 4 4
Linux 0 1 1 1 1 0 1 0 0 5 6 1 0 4 0 5 4 3 1 1 4 2 3 5 3 3 1 5 3 2 4 3 0 0 1 3 2 2 7 1 0 1 5 6 2 5

Readme

Source
raw.​githubusercontent.​com

GitHub release GitHub contributors GitHub issues

Git blame - Package for Sublime Text

This package enables you to query Git “blame” information for files while you are viewing/editing them in Sublime Text.

Blame information tells you who last edited a line, when they did it, and which commit they did it in. You can then choose to show that commit in full including its commit message and diff.

For this package to work, you must already have the git command-line tool installed, and be viewing/editing a file that is part of a Git repository on your hard drive.

View on the Package Control website

This package was originally created by @psykzz and is now maintained by @frou

How to use

Place the text cursor on the line you are interested in, then press CtrlAltB (Mac/Windows) or CtrlShiftQ (Linux).

(Instead of pressing the keyboard shortcut, you can alternatively right click and select Git Blame from the context menu)

The blame information will appear:

Screenshot

If you want, you can then click [Show] to show the commit in full:

Screenshot

…or click [Copy] to copy the Commit ID (aka SHA) to your clipboard.

If the latest blame information was not as illuminating as you hoped for, click the [Prev] to step back through multiple previous commits that affected the line.

To close the blame information, click the × icon, or press the keyboard shortcut again while the text cursor is still on the same line.

Advanced use

In combination with Sublime Text's Multiple Selection feature, you can query blame information for more than one line simultaneously by first placing a text cursor on each line you are interested in, and then running as described above.

You can also query blame information for every line in the entire file simultaneously by pressing CtrlAltShiftB (Mac/Windows) or CtrlShiftC (Linux). Doing this shows blame information in a different style (it's located to the left of the content, and more compact, but with fewer features):

Screenshot

To close all of them, click the × icon on any one of them, or press the keyboard shortcut again.

As well as via keyboard shortcuts, this package's commands are also made available in the Command Palette. Type “Git Blame” into it to find them:

Screenshot