gitglance

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2025 License: MIT Imports: 3 Imported by: 0

README

gitglance

Simple git terminal UI written in Go using Bubble Tea. gitglance demo

Features

  • Stage files ✔️
  • Unstage files ✔️
  • Reset files ✔️
  • View diffs ✔️
  • Commit ✔️
  • Refresh Status ✔️
  • Open Editor ✔️

Installation

Go
go install github.com/michaelhass/gitglance@latest
Homebrew

Tap:

brew install michaelhass/gitglance/gitglance
Build & run locally

Build & run:

make build
make run

Debugging:

You can run gitglance in debug mode, which will write logs to a debug.log file.

// Run the application in debug mode
make debug
// Attach to the debug log in another terminal session
make observe_log

More details in the Makefile.

Configuration

Editor

Gitglance can try to open an editor for selected files. If not configured, vi will be used. The editor is chosen from a list of options with the following priority.

  1. git config core.editor
  2. git config --global core.editor
  3. env VISUAl
  4. env EDITOR

While the editor is open, gitglance will be paused. Once the editor process finishes, gitglance resumes and updates the current status. For external editors, it may not be possible to correctly determine, if the editor process has finsihed, unless correctly configured. Example

// open zed editor in a new window (-n) and wait (-w)
export VISUAL="zed -w -n"

Inspiration

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
git
Package git provides easy execution of git commands.
Package git provides easy execution of git commands.
ui/app
Package app provides the main bubbletea model.
Package app provides the main bubbletea model.
ui/commit
Package commit provides ui to perform a git commit.
Package commit provides ui to perform a git commit.
ui/container
package container provides ui to display any model conforming to container.content inside a container.
package container provides ui to display any model conforming to container.content inside a container.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL