git-origin-check

    1.0.7 • Public • Published

    git-origin-check

    NPM

    Build Status

    Validates Git origin is set to the correct host. When used in combination with Husky as a pre-push hook it enables users to ensure code is not inadvertently pushed to the wrong Github instance. This will check static origin URLs as well as SSH aliases for the correct URL.

    Example Usage:

    1. Install Module

    npm install git-origin-check
    git-origin-check github.com
    

    2. Add Husky Hook

    "husky": {
      "hooks": {
        "pre-push": "git-origin-check github.com"
      }
    }
    

    Keywords

    Install

    npm i git-origin-check

    DownloadsWeekly Downloads

    3,270

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    5.79 kB

    Total Files

    7

    Last publish

    Collaborators

    • ntangy
    • amagana286
    • goistjt
    • americk0
    • ekozlowski
    • wbarker
    • brianantonelli
    • pofallon