giff

Crates.iogiff
lib.rsgiff
version0.2.1
created_at2024-08-06 11:37:49.941952+00
updated_at2025-03-29 20:00:31.502217+00
descriptionVisualizes the differences between the current HEAD and a specified branch in a git repository using a formatted table output in your terminal. The differences are displayed with color-coded additions and deletions for better readability.
homepagehttps://github.com/bahdotsh/giff
repositoryhttps://github.com/bahdotsh/giff
max_upload_size
id1327184
size89,730
Gokul (bahdotsh)

documentation

https://github.com/bahdotsh/giff

README

Giff - Git Diff Viewer with Interactive Rebase Support

Giff is a terminal-based Git diff viewer with interactive rebase capabilities that allows you to view and manage changes between branches.

Features

  • Side-by-Side or Unified Diff View: Choose between two different viewing modes for comparing changes
  • Interactive Navigation: Easily navigate through files and changes with keyboard shortcuts
  • Rebase Detection: Automatically detects when a rebase is needed
  • Interactive Rebasing: Accept or reject changes during rebase right from the interface

Installation

The recommended way to install giff is using Rust's package manager, Cargo. Here are several methods:

Using Cargo Install (Recommended)

cargo install giff

Clone the repository and build the project:

git clone https://github.com/your-username/giff.git
cd giff
cargo build --release

The compiled binary will be available at target/release/giff.

Usage

# View diff between main branch and HEAD
giff

# View diff between a specific branch and HEAD
giff --branch feature-branch

## Keyboard Shortcuts

### Diff Mode

| Key | Action |
|-----|--------|
| `j` / `Down` | Navigate down |
| `k` / `Up` | Navigate up |
| `Tab` | Toggle focus between file list and diff content |
| `h` / `Left` | Focus file list |
| `l` / `Right` | Focus diff content |
| `u` | Toggle between unified and side-by-side view |
| `r` | Enter rebase mode |
| `q` / `Esc` | Quit |

### Rebase Mode

| Key | Action |
|-----|--------|
| `j` / `Down` | Navigate to next change |
| `k` / `Up` | Navigate to previous change |
| `a` | Accept change |
| `x` | Reject change |
| `n` | Go to next file with changes |
| `p` | Go to previous file with changes |
| `c` | Commit accepted changes |
| `q` / `Esc` | Cancel and return to diff mode |

### Rebase Notification Dialog

| Key | Action |
|-----|--------|
| `r` | Perform rebase |
| `i` | Ignore rebase suggestion |
| `Esc` | Dismiss notification |

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.
Commit count: 33

cargo fmt