当你想更正别人仓库里的错误时,要走一个流程:
1先 fork 别人的仓库,相当于拷贝一份,不会有人直接让你修改原仓库的
2.clone 到本地分支,做一些 bug fix
3.发起 pull request 给原仓库,让他看到你修改的 bug
4.原仓库 review 这个 bug,如果是正确的话,就会 merge 到他自己的项目中

  1. 先点击 fork 仓库,项目现在就在你的账号下了
    git补充(关于pull request)转自知乎
    git补充(关于pull request)转自知乎

  2. 在你自己的机器上 git clone 这个仓库,切换分支(也可以在 master 下),做一些修改。
    ~ git clone https://github.com/beepony/bootstrap.git
    ~ cd bootstrap
    ~ git checkout -b test-pr
    ~ git add . && git commit -m "test-pr"
    ~ git push origin test-pr

  3. 完成修改之后,回到 test-pr 分支,点击旁边绿色的 Compare & pull request 按钮
    git补充(关于pull request)转自知乎

  4. 添加一些注释信息,确认提交
    git补充(关于pull request)转自知乎

摘抄来自https://www.zhihu.com/question/21682976
仅供学习使用

相关文章:

  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2021-03-30
  • 2021-06-01
  • 2021-08-23
  • 2021-08-21
猜你喜欢
  • 2021-11-22
  • 2021-12-04
  • 2021-08-15
  • 2022-01-22
  • 2021-07-18
  • 2021-07-24
相关资源
相似解决方案