当前位置:网站首页>集中式版本控制工具代码合并问题
集中式版本控制工具代码合并问题
2022-07-26 22:43:00 【零舍】
问题描述:今天刚开始学版本控制工具,其工作流程是协同工作的人们通过客户端连到服务器,取出最新的文件,进行工作,然后提交更新。那么如果多个人同时修改同一份文件,那么会产生什么后果,并且文件如何合并,形成最新文件?
后果及合并规则:
如果多个人同时修改了同个文件中的不同行的代码,那么版本控制工具会在第一个人提交后,提醒后续提交的人更新文件,否则无法提交,更新文件后才能将自己修改的文件与库中文件合并,依次这样进行,所以最终得到的最新文件就是所有人修改后的版本。
但是如果多个人同时修改了同个文件中的同一行代码或者无法进行对比的二进制文件,比如图片等,那么在进行版本控制提交时容易产生冲突,造成无法提交的问题。此时在第一个人提交修改的文件到库中后,后续提交的人也会提示更新文件,并且会造成冲突,只有按照提示解决冲突后才能继续进行提交库,最终得到的最新文件是按照最后一个提交库的人解决冲突的版本。
解决冲突的方法此处就不提供了,此篇只为理解集中式版本控制工具多人同时修改同一文件如何合并文件问题。
SVN解决冲突的方法参考链接:
边栏推荐
- 物联网改善我们生活的 6 种方式
- MySQL index optimization: scenarios where the index fails and is not suitable for indexing
- 25 common questions in Flink interview (no answer)
- Zhimi Tencent cloud live mlvb plug-in optimization tutorial: six steps to improve streaming speed + reduce live delay
- 快来帮你三分钟了解物联网
- adb shell截屏录屏命令
- Li Hongyi machine learning (2017 Edition)_ P5: error
- Li Hongyi machine learning (2021 Edition)_ P7-9: training skills
- 数据库期中(二)
- 腾讯云MLVB技术如何在移动直播服务中突出重围之基础概念
猜你喜欢

Flink1.11 SQL local run demo & local webui visual solution

李宏毅机器学习(2021版)_P5-6:小梯度处理

李宏毅机器学习(2017版)_P21:卷积神经网络CNN

SQL learning (3) -- complex query and function operation of tables

创建MDK工程

Deep understanding of pod objects: basic management

Redis -- cache avalanche, cache penetration, cache breakdown

非递归前中后序遍历二叉树

李宏毅机器学习(2017版)_P6-8:梯度下降

Tencent upgrades the live broadcast function of video Number applet. Tencent's foundation for continuous promotion of live broadcast is this technology called visual cube (mlvb)
随机推荐
Redisson working principle - source code analysis
Flinksql multi table (three table) join/interval join
深度学习笔记
05 - attack and defense of phishing websites
Spark ---- shuffle and partition of RDD
Neo4j Basic Guide (installation, node and relationship data import, data query)
5. 合法的括号串
初中高三部曲音视频下载Pronunciation Pairs+Ship or Sheep+Tree or Three
李宏毅机器学习(2017版)_P13:深度学习
Verilog过程赋值语句
李宏毅机器学习(2017版)_P21:卷积神经网络CNN
堆排序相关知识总结
解决rsyslog服务占用内存过高
李宏毅机器学习(2017版)_P5:误差
Keil开发环境的搭建送安装包
创建MDK工程
In depth learning report (1)
[CTF attack and defense world] questions about backup in the web area
网站日志采集和分析流程
数据库期中(一)