当前位置: 首页 > 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.dtcms.com/a/334176.html

相关文章:

  • 车载控制器硬件电路-各电源轨和功能模块定义以及作用
  • 从冒泡到快速排序:探索经典排序算法的奥秘(二)
  • 【Qt开发】常用控件(四)
  • 适合2D而非3D的游戏
  • 链表。。。
  • YOLOv5、YOLOv8的损失函数、正负样本匹配策略和anchor_free/anchor_base的差异对比
  • 免费数独游戏,多难度等级挑战
  • 存储设备的核心单位:扇区、页与块
  • CentOS 7 一键部署 上Maria Database(MariaDB)10.3.38 安装手册(避开 Oracle 19c 路径)
  • 北京JAVA基础面试30天打卡11
  • JetPack系列教程(八):PDF库——让Android应用也能优雅“翻页”
  • ESP32 C3 开发板使用教程 01-测试显示屏
  • 【系统分析师】软件需求工程——第11章学习笔记(下)
  • Android 移动端 UI 设计:前端常用设计原则总结
  • 【Docker项目实战】使用Docker部署Notepad轻量级记事本
  • vscode中使用CMake Tools生成compile_commands.json文件后,如何告诉clangd这个文件在哪里呢?
  • MySQL 基础操作与编码设置:从入门到避坑
  • 范式转移:AI幻觉的终结与GPT-5的“可信”架构设计
  • 《解耦的艺术:Python 观察者模式在 GUI 与事件驱动中的实战》
  • 音视频学习(五十四):基于ffmpeg实现音频重采样
  • 【科普向-第一篇】数字钥匙生态全景:手机厂商、车厂与协议之争
  • GPFS集群性能压测
  • C++编程学习阶段性总结
  • 2025年生成式引擎优化(GEO)服务商技术能力评估报告
  • 企业运维规划及Linux介绍虚拟环境搭建
  • ROS相关的ubuntu基础教程
  • 神经网络 常见分类
  • 视觉语言模型(VLA)分类方法体系
  • 6JSON格式转python并实现数据可视化
  • RJ45 网口集成万兆(10Gbps)以太网的核心是通过物理层技术革新和信号处理优化,在传统铜缆(双绞线)介质上突破速率限制,其原理可从以下几个关键维度解析