Giter Site home page Giter Site logo

cli-commit's Introduction

commit

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

Install

Prerequisites

To build this project you will need pkg installed globally:

npm install -g pkg

Build

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

Usage

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'

Other Examples

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

Options

-t or --type

You can use the -t option to specify the conventional commit type.

-s or --scope

You can use the -s option to specify the commit scope.

-m or --message

You can use the -m option to specify the commit description.

Flags

-na or --noadd

You can use the -a flag to not run git add.

-np or --nopush

You can use the -p flag to not run git push.

--dryrun or -D

You can use the --dryrun flag to not run any git commands and print the commands that would be run.

--version

Print the version and exit.

Development

To run the code during development without having to build first:

node bin/index.js

cli-commit's People

Contributors

dependabot[bot] avatar ezrafree avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.