Skip to content

Bash scripts and commands to elevate working productivity, including git, fuzzy, etc.

License

Notifications You must be signed in to change notification settings

LaansDole/go-git-tui

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Git TUI

This project provides a terminal user interface for Git operations, specifically focusing on staging files and committing changes using fuzzy selection. It consists of two main commands: gadd for staging files and gcommit for committing changes.

Roadmap

Features:

  • Fuzzy File Selection: Quickly stage files using fuzzy matching.
  • Interactive Commit Messages: Easily specify commit types and messages through prompts.

TODOs:

  • Refer to gadd.sh in scripts/, the tui should display the git diff.
  • A clearer ui to display that you have selected an option in gcommit

Project Structure

go-git-tui
├── cmd
│   ├── gadd
│   │   └── main.go       # Main entry for the gadd command
│   └── gcommit
│       └── main.go       # Main entry for the gcommit command
├── internal
│   ├── ui
│   │   ├── common.go     # Common UI functions
│   │   ├── add.go        # UI logic for gadd command
│   │   └── commit.go     # UI logic for gcommit command
│   └── git
│       └── commands.go   # Git command interactions
├── go.mod                 # Go module configuration
├── go.sum                 # Module dependency checksums
├── Makefile               # Build instructions
└── README.md              # Project documentation

Installation

Option 1:

  1. Clone the repository:

    git clone https://github.com/LaansDole/go-git-tui.git
    cd go-git-tui
  2. Ensure you have Go installed on your machine.

  3. Install the required dependencies:

    go mod tidy

Option 2:

To install the commands globally on your system:

go install github.com/LaansDole/go-git-tui/cmd/gadd@latest
go install github.com/LaansDole/go-git-tui/cmd/gcommit@latest

Usage

gadd

To stage files using the gadd command, run:

go run cmd/gadd/main.go

This will open a fuzzy finder interface to select files to stage.

gcommit

To commit staged changes using the gcommit command, run:

go run cmd/gcommit/main.go

You will be prompted to enter a commit type and message.

Makefile Utilities

The Makefile provides several utilities to streamline development and usage:

  • Build: Compile the project binaries.

    make build
  • Clean: Remove compiled binaries and other generated files.

    make clean
  • Run: Execute the main application.

    make run
  • Test: Run the test suite.

    make test

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Bash scripts and commands to elevate working productivity, including git, fuzzy, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 71.3%
  • Shell 20.2%
  • Makefile 8.5%