Socket
Book a DemoInstallSign in
Socket

github-upstreamer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-upstreamer

Auto configure a remote for a fork!

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

github-upstreamer Build Status

Auto configure a remote for a fork!

Install

$ npm install --save github-upstreamer

Usage

const githubUpstreamer = require('github-upstreamer');

githubUpstreamer(dir, name, function(err, res){
	if(err) {
		console.error(err);
	} else {
		console.log('Upstream is set!');
	}
});

API

githubUpstreamer([path], [name], cb)

path

Type: string Default: .

Path to the git repo.

name

Type: string
Default: upstream

Remote name for the fork.

CLI

$ npm install --global github-upstreamer
$ github-upstreamer --help

  Set upstream for your github fork.

  Usage
    $ github-upstreamer

  Options
   --name  Lorem. [Default: upstream]
   --dir path/to/repository [Default: "."]

  Examples
    $ github-upstreamer
    $ github-upstreamer --name upstream2 --dir /path/to/repo

Usecase:

Say a github user monkey forked yeoman/generator-node:

$ git remote -v
origin	https://github.com/monkey/generator-node.git (fetch)
origin	https://github.com/monkey/generator-node.git (push)

$ github-upstreamer # magic happens

$ git remote -v

origin	https://github.com/monkey/generator-node.git (fetch)
origin	https://github.com/monkey/generator-node.git (push)
upstream	https://github.com/yeoman/generator-node.git (fetch)
upstream	https://github.com/yeoman/generator-node.git (push)

License

MIT © Hemanth.HM

Keywords

cli-app

FAQs

Package last updated on 29 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts