当前位置: 首页 > 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.xdnf.cn/news/1307467.html

相关文章:

  • 双向SSL认证之Apache实战配置
  • 从“Hello World”到“高并发中间件”:Go 语言 2025 系统学习路线图
  • 系统思考:情绪内耗与思维模式
  • linux服务器查看某个服务启动,运行的时间
  • DAY 46 通道注意力(SE注意力)
  • 【100页PPT】数字化转型某著名企业集团信息化顶层规划方案(附下载方式)
  • termios 线程 poll epoll进化 二叉AVL红黑树
  • 智能工厂生产监控大屏-vue纯前端静态页面练习
  • PowerShell 格式化系统完全掌握(下):自定义列/格式字符串/对齐与宽度 + 实战模板
  • System V通信机制
  • Docker之安装部署——(1)配置国内docker镜像源
  • 【Twincat3】IO的SCAN 不可选中,SCAN中后扫描不到设备
  • 代码随想录二刷之“字符串”~GO
  • 嵌入式开发学习———Linux环境下网络编程学习(二)
  • 科普:Pygame 中,`pg.Surface` v.s. `screen`
  • 电工的基础知识以及仪器的使用
  • 浏览器面试题及详细答案 88道(45-55)
  • 吉他和弦学习:从音程基石到流畅弹奏
  • 机器学习——PCA(主成分分析)降维
  • MySQL快速恢复数据的N种方案完全教程
  • JavaWeb开发_Day12
  • 云原生俱乐部-杂谈2
  • UI-TARS-Desktop 深度解析:下一代智能自动化桌面平台
  • 数据处理与统计分析 —— numpy入门
  • 《Attention-driven GUI Grounding》论文精读笔记
  • 【Spring Cloud 微服务】1.Hystrix断路器
  • 【LeetCode 热题 100】55. 跳跃游戏
  • @mcp.tool如何从函数定义映射到llm系统输入
  • 如何回答研究过MQ的源码吗
  • 【121页PPT】智慧方案智慧综合体智能化设计方案(附下载方式)