zoukankan      html  css  js  c++  java
  • Github上fork项目后与原项目保持同步

    **步骤**

    假设来源为 `https://github.com/_original/_project.git`
    fork 项目为  `https://github.com/_your/_project.git`
     


    1. 检出自己在github上fork别人的分支到目录下  

            git clone https://github.com/_your/_project.git

    2. 进到 _project 目录下,然后增加远程分支(fork的分支),名为 update_stream(名字任意)到本地

            git remote add update_stream https://github.com/_original/_project.git

    3. 运行命令:`git remote -v`, 会发现多出来了一个update_stream的远程分支

            git remote -v

    4. 然后把远程原始分支 update_stream 的代码拉到本地  

            git fetch update_stream
     
    5. 合并对方远程原始分支 update_stream 的代码

            git merge update_stream/master

    6. 最后把最新的代码推送到你的github上

        git push origin master

    7. 如果需要给update_stream发送Pull Request

        打开 `https://github.com/_your/_project.git`  
        点击Pull Request -> 点击New Pull Request -> 输入Title和功能说明 -> 点击Send pull request

  • 相关阅读:
    丸内の霊 補充4
    丸内の霊 補充3
    丸内の霊 補充2
    N1 语法单词
    完全掌握1级日本与能力考试语法问题对策
    丸の内の霊 補充1
    丸内の霊 8
    丸内の霊   7
    丸内の霊  6
    丸の内の霊 6
  • 原文地址:https://www.cnblogs.com/relucent/p/6479213.html
Copyright © 2011-2022 走看看