GitLine

by qingchuan
5
4
3
2
1
Score: 50/100

Description

Reviews

No reviews yet.

Stats

1
stars
86
downloads
0
forks
50
days
9
days
9
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
14
commits

Latest Version

10 days ago

Changelog

GitLine 0.1.5

What's new

  • Prevent stale commit messages after multi-line paste and unsaved edits
  • Pause blame for the entire document until the edited file is saved
  • Invalidate cached blame after git commit and git add using HEAD/index state
  • Add Obsidian 1.13 declarative settings so options appear in settings search
  • Add release artifact attestation without modifying immutable release assets
  • Harden Git execution and remove unsafe any usage

Files

  • main.js, manifest.json, styles.css attached as release assets (required by Obsidian)

README file from

Github

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 when a file is saved or the repository state changes.
  • Robustness: git is detected automatically; a friendly hint is shown instead of an error when git is unavailable.

Security

GitLine invokes the locally installed git executable with execFile and an argument array. It never passes input through a shell and never executes user-provided command strings.

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

Setting Description Default
Enable Master switch for the line-end blame display. On
Display format Template with placeholders{date} {time} {author} {message} {hash}. {author} {time} {message}
Time style Relative (e.g. "3 days ago") or Absolute (accurate to the minute). Absolute
Absolute time format Moment format string. YYYY-MM-DD HH:mm
Uncommitted lines Show a marker on uncommitted lines. On
Ignore whitespace Map togit blame -w. Off
Status bar Show the current line's author in the status bar. On
Cache size Maximum 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