An open API service indexing awesome lists of open source software.

https://github.com/sensorario/gocommit

Un robo del coso per committare cose ma sopratutto per giocare con go
https://github.com/sensorario/gocommit

Last synced: 10 months ago
JSON representation

Un robo del coso per committare cose ma sopratutto per giocare con go

Awesome Lists containing this project

README

          

# gocommit

A simple Go CLI tool that stages all changes, commits them with a message, and pushes to your Git repository.

![Prompt Example](prompt.png)

## ๐Ÿ“ฆ Installation

### Requirements

- [Go](https://go.dev/dl/) installed (`go version`)
- `make` and `git` available on your system

### Steps

Clone the repository and install the tool globally:

```bash
git clone https://github.com/sensorario/gocommit.git
cd gocommit
make
```

This will:

- Run `go mod tidy` to install dependencies
- Compile the Go program
- Move the resulting binary to `/usr/local/bin/gocommit`
- Overwrite any existing command with the same name

## ๐Ÿงผ Clean

To remove the compiled binary from the current directory:

```bash
make clean
```

## ๐Ÿš€ Usage

Navigate to any Git repository and run:

```bash
gocommit
```

Youโ€™ll be prompted to enter a commit message. The tool executes:

1. `git add .`
2. `git commit -m "your message"`
3. `git push`

## ๐Ÿ™‹โ€โ™‚๏ธ Example

```bash
$ gocommit
Enter commit message: fix: correct typo in README
[main b2n3m45n] fix: correct typo in README
1 file changed, 1 insertion(+), 1 deletion(+)
To github.com:your-user/your-repo.git
```

## ๐Ÿ›  Development

To install or update dependencies manually:

```bash
go mod tidy
```

To build the binary manually:

```bash
go build -o gocommit main.go
```

## ๐Ÿ“ License

MIT