1.0.3 • Published 4 years ago

git-autosave v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Git Auto-Save

Perform auto-saving git repositories that correspond to some criteria

NPM version

Installation

With npm:

npm install -g git-autosave

With yarn 1.x:

yarn global add git-autosave

With yarn 2+ (installing and executing):

yarn dlx git-autosave

How to use

By default, the script will search for each git repository in the current folder, and in all subfolder, excluding node_modules folder

In each folder, it will search for the package.json file, and check if a .git folder exists. If that criteria match, the script will check if the current branch has a keyword in its name (default keyword: draft)

If all that critera match and there is some file to commit, it will add the files, commit with the date as a message, and push to origin.

The script doesn't check the last commit date. Executing the command multiple time can result of a lot of commits. Use this command in a schedule task

Options

Some options can be configured:

  • Base directory. The base directory can be set with --dir=<my working dir>
  • Search Term. The default search term is package.json. It can be override with --search=<my entry point>
  • Branch Term. The default branch term is draft. It can be override with --branch=<my branch name>
  • Searching through node_modules. By default, the script omit node_modules folder. It can be override with -i

Runing the script

With default options

git-autosave

Other examples

git-autosave --dir=".." -i

Other examples

git-autosave --dir="D:/Code/auto-save" --search=Gemfile --branch=temp
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago