当前位置:网站首页>pull request
pull request
2022-06-27 11:29:00 【qq_42775938】
“Pull Request 是一种通知机制。
你修改了他人的代码,将你的修改通知原来的作者,希望他合并你的修改,这就是 Pull Request。”
假设要pull request的库为https://github.com/usernameA/repository
1.fork原仓库
首先你需要对库repository进行fork。假设fork以后,仓库repository在你的github中的地址为https://github.com/mynameA/repository
2.修改代码,并上传到远程仓库
执行:
git clone https://github.com/mynameA/repository # 将仓库从你的github克隆下来
创建分支feature、修改、add、commit、merge
git push -u origin feature # 第一次需要指明origin和feature,以后只需要输入git push就相当于git push -u origin feature
3.执行pull request
在https://github.com/mynameA/repository中创建pull request,如下:
选择将mynameA/repository的哪个分支merge到usernameA/repository的哪个分支,如下:
说明1:
git push -u origin master
相当于
git branch --set-upstream-to=origin/master master // 将远程仓库origin的master分支与本地仓库master分支关联
加
git push origin master
说明2:
在我们push前,应该让本地仓库和https://github.com/usernameA/repository保持同步,而不是和https://github.com/mynameA/repository保持同步,执行下面命令:
git remote add remoteA https://github.com/usernameA/repository # 将远程库添加进来,命名为remoteA
git fetch remoteA # 获取远程库中的最新更改
git merge remoteA/master # 合并远程的最新代码到本分支
git pull remoteA/master:feature # 合并仓库remoteA中的master到本地仓库的feature分支中
git pull = git fetch 和 git merge
命令格式如下:
git pull <远程主机名> <远程分支名>:<本地分支名>
参考:pull request
git、github 保姆级教程入门,工作和协作必备技术,github提交pr - pull request
边栏推荐
- [tcapulusdb knowledge base] Introduction to tcapulusdb data structure
- R language dplyr package arrange function sorts dataframe data, sorts dataframe data through multiple data columns, specifies the first field to be sorted in descending order, and does not specify the
- Excel中输入整数却总是显示小数,如何调整?
- C语言0长度数组的妙用
- 杰理之IO 口中断使用注意事项【篇】
- [tcapulusdb knowledge base] tcapulusdb system user group introduction
- Redis 分布式锁15问,看看你都掌握了哪些?
- Informatics Olympiad all in one 1332: [example 2-1] weekend dance
- MQTT协议栈原理及交互流程图
- 政策关注 | 加快构建数据基础制度,维护国家数据安全
猜你喜欢

Oracle-分组统计查询

【TcaplusDB知识库】TcaplusDB运维单据介绍

Redis 分布式锁15问,看看你都掌握了哪些?

巅峰小店APP仿站开发玩法模式讲解源码分享

c/s 架构

Unity Shader学习(一)认识unity shader基本结构

"24 of the 29 students in the class successfully went to graduate school" rushed to the hot search! Where are the remaining five?

QStyle类用法总结(三)

KDD 2022 | 基于分层图扩散学习的癫痫波预测
![Jerry's DAC output mode setting [chapter]](/img/2e/62bc74e216ed941bd2a0a191db63f0.png)
Jerry's DAC output mode setting [chapter]
随机推荐
[tcapulusdb knowledge base] tcapulusdb doc acceptance - create business introduction
Open source model library of flying propeller industry: accelerating the development and application of enterprise AI tasks
R语言使用glm函数构建泊松对数线性回归模型处理三维列联表数据构建饱和模型、使用step函数基于AIC指标实现逐步回归筛选最佳模型、解读分析模型
Excel中输入整数却总是显示小数,如何调整?
Redis 分布式锁15问,看看你都掌握了哪些?
QStyle类用法总结(三)
Native JS implements page scroll bar loading data and page drop-down loading content
杰理之睡眠以后定时唤醒系统继续跑不复位【篇】
15+城市道路要素分割应用,用这一个分割模型就够了!
【TcaplusDB知识库】TcaplusDB数据构造介绍
R语言使用epiDisplay包的poisgof函数对泊松回归(Poisson Regression)执行拟合优度检验、检验是否存在过度离散问题(overdispersion)
FileOutputStream
"24 of the 29 students in the class successfully went to graduate school" rushed to the hot search! Where are the remaining five?
In depth analysis of error solutions and problems in dynamic loading of unity shadow and outline components
Proe/Creo家电产品结构设计规范-电煎锅
杰理之串口通信 串口接收IO需要设置数字功能【篇】
matlab习题 —— 创建 50 行 50 列全零矩阵、全 1 矩阵、单位矩阵、对角矩阵,输出矩阵第135号元素。
Mqtt protocol stack principle and interaction flow chart
R language uses the polR function of mass package to construct the ordered multi classification logistic regression model, and uses the vglm function of VGAM package to test the parallelism hypothesis
deep learning statistical arbitrage