commit
is a command-line convenience utility to add files to be tracked, format your commit message, and push your changes.
It gathers the parts of the conventional commit message, and then runs the add
, commit
, and push
commands for you.
For example:
git add -v .
git commit -m 'feat(navarbar): implement search bar'
git push origin HEAD
To build this project you will need pkg
installed globally:
npm install -g pkg
Run the following command to build commit
:
yarn build
Then to install, copy the executable to someplace in your $PATH
. For example:
cp -v commit /usr/local/bin
To be prompted for your input, simply run the command with no arguments:
commit
Alternatively, you can provide your input via command-line arguments:
commit -t feat -s demo -d 'my commit message'
If you only want to add specific files to the commit, you can use the -na
flag:
git add foo.ts && commit -t feat -s demo -d 'my commit message' -na
If you want to commit
but aren't ready to push
just yet, you can use the -np
flag:
commit -t feat -s demo -d 'my commit message' -np
You can use the -t
option to specify the conventional commit type.
You can use the -s
option to specify the commit scope.
You can use the -m
option to specify the commit description.
You can use the -a
flag to not run git add
.
You can use the -p
flag to not run git push
.
You can use the --dryrun
flag to not run any git
commands and print the
commands that would be run.
Print the version and exit.
To run the code during development without having to build first:
node bin/index.js