github上fork一个仓库并merge

2020-01-22  本文已影响0人  草珊瑚_6557

1. fork上游仓库

fork仓库https://github.com/apache/dubbo-js
git clone已fork的仓库 https://github.com/xxx/dubbo-js.git

2. typescript编译打包

进入到./packages/dubbo子目录
修改tsconfig.json新增

"compilerOptions": {
    // ...
    "allowJs": true
}

安装typescript进行代码编译

npm install typescript -g
npm install --save-dev @types/node
rm -rf ./es7 # 删除之前编译的目录
tsc 

3. npm包发布

然后登陆npm账号进行发布,有修改的发布需要修改package.json版本号

npm login
npm publish

4. merge上游仓库master分支最新代码

git remote -v 
git remote add upstream https://github.com/apache/dubbo-js
git fetch upstream
git merge upstream/master
git push 

其它分支改下命令git merge upstream/其它分支即可。

参考:
https://www.jianshu.com/p/8fa2c50720e4

上一篇 下一篇

猜你喜欢

热点阅读