Skip to content

Cox-Automotive/git-origin-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
  }
}

About

Validates Git origin is set to the correct host.

Resources

License

Stars

Watchers

Forks

Packages

No packages published