Skip to content

devpow112/git-sanitize

Repository files navigation

Git Sanitize

License Version Release Vulnerabilities Node Version

Git custom command that will do a full "sanitize" of a branch. This will reset the branch and all submodules to be back to the branches HEAD state by effectively running the following.

git clean -xfdf
git submodule foreach --recursive git clean -xfdf
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive

Installation

npm i -g git-sanitize

Usage

git sanitize

Development

Development can be done on any machine that can install Node.js.

Install Dependencies

Install dependencies via npm.

npm i

Linting

Execute linters via npm.

# git, javascript and markdown
npm run lint

# git only
npm run lint:git

# javascript only
npm run lint:js

# markdown only
npm run lint:md

Formatting

Execute formatters via npm.

# javascript and markdown
npm run format

# javascript only
npm run format:js

# markdown only
npm run format:md

Building

Run a build via npm.

npm run build