go install github.com/akm/git-exec@latest
You might have to run asdf reshim
.
git exec (your command with argument)
git-exec executes given command and git add .
and git commit
automatically.
You can change message prefix by environment variable GIT_EXEC_COMMIT_PREFIX
.
- Use shell for redirection
git exec /bin/bash -c 'echo "foo" >> README.md'
- Pass environment variables before the executable command
git exec FOO=fooooo command1 args1 args2