美文网首页
github上fork一个仓库并merge

github上fork一个仓库并merge

作者: 草珊瑚_6557 | 来源:发表于2020-01-22 14:21 被阅读0次

    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

    相关文章

      网友评论

          本文标题:github上fork一个仓库并merge

          本文链接:https://www.haomeiwen.com/subject/ednuzctx.html