npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

git-add-and-commit

v1.2.10

Published

A quicker way to commit individual files.

Downloads

8

Readme

git-add-and-commit

Quickly add and commit multiple files with one command.

$ npm install -g git-add-and-commit
$ gac --help

Usage

Provide a list of file globs to match and a commit message. Matching is done via minimatch and done case-insensitively by default.

To add and commit all files under src/js/ and src/css/:

$ gac src/js/**/*.js src/css/**/*.css "Commit all js and css files"

This will also work...

$ gac .js .css "Commit all js and css files"

...but will also match any .js and .css file anywhere under the git root -- see disclaimer.

DISCLAIMER

I made this thing so that I could quickly type a substring of a file and it would match. So if a given glob doesn't match any files at first, it tries to match a massaged version of the glob and see if that matches anything. For instance, providing module will actually match something like root/some-child/js/modules/something/index.js. It will also match anything and everything containing module in the filename, so be careful!

Interactive

Because of this dangerous blindly-commit-any-goddamn-file attitude, there's an interactive version to help you see which files will be added by the given globs. Pressing tab will show a diff for all selected files. You can select a single file by using the arrow keys.

The full help screen

DESCRIPTION
	This command quickens the commit process for individual files. Files can be
	added by providing a list of file globs. For example, "src/**/*" will match
	all files of all subfolders of "src/". If the given glob is a substring of
	a filename a match will always be made, unless the --strict option is given.
	By default, all matches are made case-insensitively.

	You can specify which type of git files to match by using the --only and
	--except options. Git types must be deleted, modified, staged, or untracked
	(d, m, s, u), and separated by commas.


USAGE
	gac [options]
	gac [options] <path> <message>


OPTIONS
	-c, --case-sensitive          Match files case-sensitively.
	-e, --except=[type...]        Specify which type of git files to ignore.
	-h, --help                    Display this help screen.
	-i, --interactive             Interactively find and commit files.
	-o, --only=[type...]          Specify which type of git files to look for.
	-s, --silent                  Suppress success messages.
	-S, --strict                  Match files by only the exact glob given.
	-v, --version                 Print the version of this module.


EXAMPLES
	gac README "Add README" --case-sensitive
	gac html js scss "Commit all html, js, and scss files"
	gac --only modified,staged * "Commit all modified and staged files"
	gac -e=d,u * "Commit all files that are not deleted or untracked"