Git 学习笔记之 merge

Merge:

1、Fast-forward(快进式)

2、recursice strategy (策略合并,三方合并)

  • Fast-forward

  • 策略合并

//创建一个文件夹,并初始化 Git
mkdir GitDemo
cd GitDemo
git init//初次提交,创建 master 分支
touch master.txt
git add.
git commit -m '添加master文件'//从master分支末尾,创建并切换 featureA 分支,并创建一个提交
git checkout -b featureA
touch A.txt
git add.
git commit -m '添加A文件'//从master分支末尾,创建并切换 featureB 分支,并创建一个提交
git checkout master
git checkout -b featureB
touch B.txt
git add.
git commit -m '添加B文件'//切换 master 分支
git checkout master//master 合并 featureA 分支
git merge featureA//master 合并featureA 后再合并 featureB 分支
git merge featureB复制代码

执行结果如图:

合并过程如图:

这是没有冲突的时候,但是日常肯定会有冲突的,那么我们就创建一个冲突。 我们在三个分支的 master 文件都进行修改。每一个分支都不同。

我们修改后 add commit 就好了。

Git Flow 的作者 Vincent Driessen 非常建议,在 合并分支 merge 的时候加上 no-ff 参数。意思是不要选择 Fast-Forward 模式,而是采用 Recursice Strategy 策略模式。这样会让我们多一个合并提交,这样做的好处是有一个非常清晰的提交历史。可以看到合并分支的存在。

【完全copy文章】

[Git三大特色之Branch(分支)]blog.csdn.net/qq_32452623…

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/387848.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

熊猫直播 使用什么sdk_没什么可花的-但是16项基本操作才能让您开始使用熊猫

熊猫直播 使用什么sdkPython has become the go-to programming language for many data scientists and machine learning researchers. One essential data processing tool for them to make this choice is the pandas library. For sure, the pandas library is so versat…

萌新一手包App前后端开发日记(一)

从事Android移动端也有些日子了,还记得一开始选择这份工作,是憧憬着有朝一日能让亲朋好友用上自己开发的软件,但日子久了才发现,并不是所有的公司,所有的项目的适用群体都是“亲朋好友”,/无奈脸 摊手。当…

方差,协方差 、统计学的基本概念

一、统计学的基本概念 统计学里最基本的概念就是样本的均值、方差、标准差。首先,我们给定一个含有n个样本的集合,下面给出这些概念的公式描述: 均值: 标准差: 方差: 均值描述的是样本集合的中间点&#xf…

关系型数据库的核心单元是_核中的数据关系

关系型数据库的核心单元是Nucleoid is an open source (Apache 2.0), a runtime environment that provides logical integrity in declarative programming, and at the same time, it stores declarative statements so that it doesn’t require external database, in shor…

MongoDB第二天

集合的操作: db.表名称 show tables / collection db.表名.drop() 文档的操作: 插入数据 db.表名.insert({"name":"jerry"}) db.insertMany([{"name":"sb",...}]) var ul {"name":"sb"} db.sb.insert(ul) db.sb.…

Python 主成分分析PCA

Python 主成分分析PCA 主成分分析&#xff08;PCA&#xff09;是一种基于变量协方差矩阵对数据进行压缩降维、去噪的有效方法&#xff0c;PCA的思想是将n维特征映射到k维上&#xff08;k<n&#xff09;&#xff0c;这k维特征称为主元&#xff0c;是旧特征的线性组合&#xf…

小程序 国际化_在国际化您的应用程序时忘记的一件事

小程序 国际化The hidden bugs waiting to be found by your international users您的国际用户正在等待发现的隐藏错误 While internationalizing our applications, we focus on the things we can see: text, tool-tips, error messages, and the like. But, hidden in our …

三. 性能测试领域

能力验证&#xff1a; 概念&#xff1a;系统能否在A条件下具备B能力 应用&#xff1a;为客户进行系统上线后的验收测试&#xff0c;作为第三方对一个已经部署系统的性能验证 特点&#xff1a;需要在已确定的环境下运行 需要根据典型场景设计测试方案和用例 一个典型场景包括操…

PCA主成分分析Python实现

作者&#xff1a;拾毅者 出处&#xff1a;http://blog.csdn.net/Dream_angel_Z/article/details/50760130 Github源码&#xff1a;https://github.com/csuldw/MachineLearning/tree/master/PCA PCA&#xff08;principle component analysis&#xff09; &#xff0c;主成分分…

scp

将文件或目录从本地通过网络拷贝到目标端。拷贝目录要带 -r 参数 格式&#xff1a;scp 本地用户名IP地址:文件名1 远程用户名IP地址:文件名 2 例&#xff1a; scp media.repo root192.168.20.32:/etc/yum.repos.d/ 将远程主机文件或目录拷贝到本机&#xff0c;源和目的参数调换…

robo 3t连接_使用robo 3t studio 3t连接到地图集

robo 3t连接Robo 3T (formerly Robomongo) is a graphical application to connect to MongoDB. The newest version now includes support for TLS/SSL and SNI which is required to connect to Atlas M0 free tier clusters.Robo 3T(以前称为Robomongo )是用于连接MongoDB的…

JavaWeb--JavaEE

一、JavaEE平台安装1、升级eclipseEE插件2、MyEclipse二、配置Eclipse工作空间1.字体设置 2.工作空间编码 UTF-83.JDK版本指定 4.集成Tomcat Server运行环境5.配置server webapps目录 端口号 启动时间等三、创建第一个Web项目1.创建 Web Project2.设置 tomcat、创建web.xml3.目…

软件需求规格说明书通用模版_通用需求挑战和机遇

软件需求规格说明书通用模版When developing applications there will be requirements that are needed on more than one application. Examples of such common requirements are non-functional, cookie consent and design patterns. How can we work with these types of…

python版PCA(主成分分析)

python版PCA&#xff08;主成分分析&#xff09; 在用统计分析方法研究这个多变量的课题时&#xff0c;变量个数太多就会增加课题的复杂性。人们自然希望变量个数较少而得到的信息较多。在很多情形&#xff0c;变量之间是有一定的相关关系的&#xff0c;当两个变量之间有一定…

干货|Spring Cloud Bus 消息总线介绍

2019独角兽企业重金招聘Python工程师标准>>> 继上一篇 干货&#xff5c;Spring Cloud Stream 体系及原理介绍 之后&#xff0c;本期我们来了解下 Spring Cloud 体系中的另外一个组件 Spring Cloud Bus (建议先熟悉 Spring Cloud Stream&#xff0c;不然无法理解 Spr…

一类动词二类动词三类动词_基于http动词的完全无效授权技术

一类动词二类动词三类动词Authorization is a basic feature of modern web applications. It’s a mechanism of specifying access rights or privileges to resources according to user roles. In case of CMS like applications, it needs to be equipped with advanced l…

主成份分析(PCA)详解

主成分分析法&#xff08;Principal Component Analysis&#xff09;大多在数据维度比较高的时候&#xff0c;用来减少数据维度&#xff0c;因而加快模型训练速度。另外也有些用途&#xff0c;比如图片压缩&#xff08;主要是用SVD&#xff0c;也可以用PCA来做&#xff09;、因…

thinkphp5记录

ThinkPHP5 隐藏index.php问题 thinkphp模板输出cookie,session中… 转载于:https://www.cnblogs.com/niuben/p/10056049.html

portainer容器可视化管理部署简要笔记

参考链接&#xff1a;https://www.portainer.io/installation/ 1、单个宿主机部署in Linux&#xff1a;$ docker volume create portainer_data$ docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer 2、单…

证明您履历表经验的防弹五步法

How many times have you gotten the question “Tell me more about your work experience at …” or “Describe an experience when you had to overcome a technical challenge”? Is your answer solid and bullet-proof every single time you have to respond? If no…