【问题标题】:In Github, how do I commit my changes to a clone and submit a pull request?在 Github 中,如何将更改提交到克隆并提交拉取请求?
【发布时间】:2011-11-13 05:39:04
【问题描述】:

我克隆了一个 Github 存储库,做了一些更改,现在我需要提交它们并发送一个拉取请求。如何将我的克隆变成叉子?

【问题讨论】:

    标签: github clone fork


    【解决方案1】:

    转到 github 存储库,然后单击“fork”。现在你有了一个 fork :) 现在你需要将你的更改推送到你的 fork 并通过 github 发送拉取请求

    git remote add myfork git@github.com:MyUsername/MyForkRepository.git
    git push myfork master
    

    从那里您可以非常轻松地发送拉取请求。

    【讨论】:

      【解决方案2】:

      您可以在命令行上使用github's hub。为了最终的胜利,您可以将“origin”更改为您的 fork,并通过一些重命名将您 fork 的项目更改为上游:

      # fork the project you cloned, creates a new remote with your username
      # (and forks the project on github if you haven't already done so):
      git fork
      git remote rename origin upstream
      git remote rename YOURUSERNAME origin
      

      【讨论】:

        猜你喜欢
        • 2013-02-01
        • 1970-01-01
        • 2011-05-05
        • 2016-12-27
        • 2020-02-12
        • 1970-01-01
        • 2013-02-02
        • 2017-08-30
        • 2019-05-07
        相关资源
        最近更新 更多