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.
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
inscripts/
, the tui should display thegit diff
. - A clearer ui to display that you have selected an option in
gcommit
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
-
Clone the repository:
git clone https://github.com/LaansDole/go-git-tui.git cd go-git-tui
-
Ensure you have Go installed on your machine.
-
Install the required dependencies:
go mod tidy
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
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.
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.
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
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.