No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-20 03:05:08 +02:00
src stable version 2026-08-20 03:05:08 +02:00
README.md 2026-08-20 02:37:28 +02:00

gaco

git add + git commit, in one safer command — for zsh.

gaco file1 file2 "commit message"
gaco file1 file2            # no message? gaco will prompt for one

Why

One Command to rule them all. One Command to Command to bring them and in the darkness call them.

git add a b c && git commit -m "msg" is slow easy and to fat-finger: misspell a filename and you're good to do everything again, forget -m and get dropped into $EDITOR. gaco validates every file before staging anything, and refuses to leave you with a silent empty-message commit unless you explicitly confirm it.

Install

Clone the repo anywhere on disk, then source the script from your .zshrc:

git clone https://github.com/Pazu101/gaco.git ~/tools/gaco
echo 'source ~/tools/gaco/src/gaco.zsh' >> ~/.zshrc
source ~/.zshrc

Using a plugin manager (zinit, antidote, oh-my-zsh custom plugins)? Point it at this repo the same way you would any other zsh plugin.

Usage

$ gaco f1.txt "add config"
[main abc1234] add config
 1 file changed, 3 insertions(+)

$ rm f1.txt
$ gaco f1.txt "remove config"     # staging a deletion works too
[main def5678] remove config
 1 file changed, 3 deletions(-)

$ gaco f1.txt
No message entered, is this intended? [y/N]:

If the last argument is a valid path, every argument is treated as a file and you'll be prompted for a message. Otherwise the last argument is treated as the commit message.

Known limitation

Shell strips quotes before gaco ever sees its arguments, so there's no perfect way to distinguish "a filename" from "a one-word commit message" — both arrive as plain strings. gaco file.txt fix where fix is also a real untracked file in your repo will be parsed as two files, not file.txt + message fix. Quote multi-word messages as usual, or add punctuation to short ones to avoid the collision.