当前位置: 首页 > news >正文

GitHub PR 提交流程

step1

  • 在 GitHub 上 fork 目标仓库(手动操作)

step2

  • 将 fork 的目标仓库克隆到本地
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>

step3

  • 与上游目标仓库建立链接
git remote add upstream https://github.com/<original-owner>/<repo-name>.git
  • 确认是否建立链接
git remote -v 

step4

  • 同步上游目标仓库代码
git pull upstream main

step5

  • 创建开发分支
    如创建新功能分支参考如下创建:
    git checkout -b feat/<feature-name>
    
    如创建修复 bug 分支参考如下创建:
    git checkout -b fix/<fix-name>
    
  • 完成功能开发
  • 提交代码
git commit -m "feat: xxx" // or git commit -m "fix: xxx"

step6

  • 推送分支
git push origin feat/<feature-name>

step7

  • 在 GitHub 目标仓库上创建 PR(手动操作)
    打开 GitHub 网页fork 的目标仓库上,选择从 feat/ -> upstream/main 发起 Pull Request

  • PR模板参考

# Pull Request Template## DescriptionPlease include a summary of the changes and the related issue.  
Also, include relevant motivation and context.Fixes #(issue number)## Type of ChangePlease delete options that are not relevant.- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update## How Has This Been Tested?Please describe the tests that you ran to verify your changes.  
Include details of your test environment, and instructions to reproduce.  - [ ] Test A
- [ ] Test B## Checklist:- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] Any dependent changes have been merged and published in downstream modules## Additional NotesAdd any other context or screenshots about the PR here.
http://www.lryc.cn/news/622940.html

相关文章:

  • 防火墙虚拟系统配置实验
  • 平滑方法(smoothing)
  • SpringBoot自动配置原理(二)
  • 算法训练营day53 图论④ 110.字符串接龙、105.有向图的完全可达性、106.岛屿的周长
  • 记与客户端的一次“无谓之争”
  • 算法训练营day52 图论③ 101.孤岛的总面积、102.沉没孤岛、103.水流问题、104.建造最大岛屿
  • UniApp 页面传参方式详解
  • 数据结构——单链表oj(续)
  • RK3568 NPU RKNN(五):RKNN-ToolKit-lite2板端推理
  • 企业级Java项目金融应用领域——银行系统(补充)
  • 小白挑战一周上架元服务——元服务开发06
  • 24. async await 原理是什么,会编译成什么
  • 硬核北京 | 2025世界机器人大会“破圈”,工业智能、康养科技…… 亦庄上演“机器人总动员”
  • 石头科技披露半年报:营收79.03亿元,同比大增78.96%
  • 5 索引的操作
  • 强化学习入门教程(附学习文档)
  • 我的世界Java版1.21.4的Fabric模组开发教程(十九)自定义生物群系
  • 小迪安全v2023学习笔记(六十三讲)—— JS加密断点调试
  • 【图论】分层图 / 拆点
  • 什么是模型预测控制?
  • Windows MCP.Net:革命性的 .NET Windows 桌面自动化 MCP 服务器
  • 【C++学习篇】:基础
  • ZKmall开源商城的数据校验之道:用规范守护业务基石
  • 中本聪思想与Web3的困境:从理论到现实的跨越
  • PyTorch生成式人工智能——使用MusicGen生成音乐
  • 新手向:Python异常处理(try-except-finally)详解
  • JVM垃圾回收器
  • 学习日志35 python
  • Python:如何在Pycharm中显示geemap地图?
  • 基于深度学习的老照片修复系统