CLI tool to simplify deployment to 'external git repositories' or 'remote branches with attached onPush action webhooks'
npm install push-to-git
This CLI tool is intended to be able to easily push the current branch to some target git repository or branch for deployment.
This is useful for services like resin.io, where pushing code to their git repository is the only way of deploying your app.
This could also be used for DevOps situations where you have 3 branches 'production', 'staging', and 'testing' for example.
Normally you would have to
* check out the desired deploy target branch,
* merge your current working branch / feature / bugfix / etc. into it,
* push the deploy target branch and
* check back into your working branch to continue work.
This script simplifies this action (for example pushing your current branch to the testing slot) to push-to-git --target origin --branch testing
And if you use this cli tool in npm scripts, you can make these deployments even simpler!
``
Usage: push-to-git [options]
Options:
-v, --version output the version number
-t --target
-b --branch
-e --extra
-m --master Sets the target branch to master per default
-d --dry-run Emulates the upload - useful for checking input params
-p --production Sets the production flag which triggers additional checks when uploading
-f --force Forces git push
-h, --help output usage information
General Information:
Version: 1.0.0
Purpose: Pushes the current branch to an arbitrary branch
in the same or in another repository for deployment.
``