神刀安全网

Forked: Fork on GitHub from the command line

Forked: Fork on GitHub from the command line

Fork all of the things.

What is this?

Couldn’t sleep, saw a tweet:

@kentcdodds Now wouldn’t it be cool, if you could go into a repo in your node_modules and run `npm fork` and it would fork it on github.

— Merrick Christensen (@iammerrick) April 5, 2016

made it so.

Getting Started

First, you need an access token from github so forked can log out in you can find instructions for thathere

Then add it to your .bashrc file, or whatever you use to manage your env variables:

export FORKED_TOKEN='PUT_YOUR_ACCESS_TOKEN_HERE' 

Then install the module:

$ npm i -g forked 

Dive into some random node module:

$ cd node_modules/react 

Run the command:

$ fork 

If it worked, you should be able to see the fork on GitHub.

Currently doesn’t work on some repositories. Had some weird redirect issues and such, but about 80% of the repos I tried worked, so that’s nice. If you find a bug please document it in the issues. :)

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Forked: Fork on GitHub from the command line

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址