How to use AutoCommitMsg in the terminal instead of as an extension
See steps below to setup and run the tool in the CLI. VS Code is not needed.
For development, see CLI Development.
This should work on Windows too but has not been tested yet.
Requires Git and Node.
$ git clone git@github.com:MichaelCurrin/auto-commit-msg.git
$ cd auto-commit-msg
$ npm install
$ npm run cli:installTo setup as a pre-commit hook, see Shell
Use the -h or --help flags with any of these to avoid making changes.
This is the main command you should use.
Note this will commit, so if you want to experiment with commit output without committing, use the command below instead.
No flags are needed.
$ gacm --helpThis will not commit.
No flags are needed.
$ acm --helpThis is a simpler command which does not interact with Git, intended for integrating with the Bash shell.
$ auto_commit_message_generate "$CHANGES"The behavior depends on how Git treats files, so you should know these points:
- The commands will pick up on staged changes and certain unstaged changes (modified and deleted, but not created as they are untracked).
- If you want to handle created files, make sure to stage them first.
- If you want to target only select changes for smaller commit, then stage stages and use the
--cachedflag to ignored unstaged changes.
If you get permission denied error, you can do this and then go back to the install step.
$ npm unlink -g auto-commit-msg