GitLine

approvedunreviewed

by qingchuan

Show Git blame (time / author / message) at the end of the current line. 在当前光标所在行的行尾显示该行 Git 归属:提交人、提交时间、提交消息,格式可配置.

↓ 17 downloadsUpdated 12d agoMIT

GitLine

GitLine is an Obsidian desktop plugin that shows Git blame information at the end of the current cursor line. Each line displays the committer, the commit time, and the commit message, using a fully configurable format.

preview

简体中文版

Features

  • Line-end blame: the blame information of the current cursor line is rendered as an inline annotation at the end of the line.
  • Configurable format: assemble the display freely with the {date}, {time}, {author}, {message} and {hash} placeholders.
  • Flexible timestamps: choose between relative time (e.g. "3 days ago") and absolute time, accurate to the minute.
  • Uncommitted lines: lines that have not been committed yet are marked as Uncommitted.
  • Status bar: shows the author of the current line (optional).
  • Whitespace handling: git blame -w can be enabled to ignore whitespace-only changes.
  • Caching: an LRU cache avoids repeated git calls; entries are invalidated automatically when a file is saved.
  • Robustness: git is detected automatically; a friendly hint is shown instead of an error when git is unavailable.

Requirements

  • Obsidian desktop (the plugin uses Node.js APIs and is desktop-only).
  • Git installed and available on PATH (git --version must succeed).

Installation

  1. Copy the gitline plugin folder into <your vault>/.obsidian/plugins/gitline/.
  2. In Obsidian, open Settings → Community plugins, and enable GitLine.

Once the plugin is published, it can also be installed directly from the community plugin list.

Usage

Open a note that lives in a Git repository and move the cursor. The blame information appears at the end of the current line.

Settings

SettingDescriptionDefault
EnableMaster switch for the line-end blame display.On
Display formatTemplate with placeholders{date} {time} {author} {message} {hash}.{author} {time} {message}
Time styleRelative (e.g. "3 days ago") or Absolute (accurate to the minute).Absolute
Absolute time formatMoment format string.YYYY-MM-DD HH:mm
Uncommitted linesShow a marker on uncommitted lines.On
Ignore whitespaceMap togit blame -w.Off
Status barShow the current line's author in the status bar.On
Cache sizeMaximum number of files kept in the LRU cache.100

Development

npm install   # install dependencies
npm run dev   # watch and build main.js
npm run build # type-check and build for production

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.