A simple Go CLI tool that stages all changes, commits them with a message, and pushes to your Git repository.
- Go installed (
go version) makeandgitavailable on your system
- MacOS: brew install go
- ...
Clone the repository and install the tool globally:
git clone https://github.com/sensorario/gocommit.git
cd gocommit
makeThis will:
- Run
go mod tidyto install dependencies - Compile the Go program
- Move the resulting binary to
/usr/local/bin/gocommit - Overwrite any existing command with the same name
To remove the compiled binary from the current directory:
make cleanNavigate to any Git repository and run:
gocommitYou’ll be prompted to enter a commit message. The tool executes:
git add .git commit -m "your message"git push
$ 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.gitTo install or update dependencies manually:
go mod tidyTo build the binary manually:
go build -o gocommit main.goMIT
