git整理纷乱的历史合并记录
https://github.com/Epix37/Hearthstone-Deck-Tracker
以上面版本库的master分支为例
父节点1
SHA-1: a21142968282ae49720cf30a0f18290b2ce74b3a
* remove hotkey from config if action could not be found, fix hotkey menu item name
父节点2
SHA-1: 86a824e8f46005db91f334dfc57b6bb58b85ceed
* fix effigy logic
合并后的节点
SHA-1: abc0e44f72a4f73523a202c9ee77c8622c1e9fbc
* Merge branch 'master' into joshtab-feature-SecretDeduction
Conflicts:
Hearthstone Deck Tracker/GameEventHandler.cs
Hearthstone Deck Tracker/Hearthstone/GameV2.cs
======新的版本库,自己进行整理的=====
在进行代码整理的时候,遇到了冲突
现在chucklu_master分支指向这个commit
SHA-1: 88fa1ee9263402626d85b5a4362e1b620935953f
* remove hotkey from config if action could not be found, fix hotkey menu item name
temp1分支指向这个commit
SHA-1: 86a824e8f46005db91f334dfc57b6bb58b85ceed
* fix effigy logic
现在执行,rebase操作。
首先切换分支到temp1
然后执行git rebase chucklu_master
$ git rebase chucklu_master
First, rewinding head to replay your work on top of it...
Applying: proof of concept: secret deduction via game rules
Applying: add hooks: spell cast, minion play, minion death
Using index info to reconstruct a base tree...
M Hearthstone Deck Tracker/GameEventHandler.cs
M Hearthstone Deck Tracker/IGameHandler.cs
M Hearthstone Deck Tracker/LogReader/Handlers/PowerGameStateHandler.cs
M Hearthstone Deck Tracker/LogReader/Handlers/TagChangeHandler.cs
<stdin>:110: trailing whitespace.
if (actionEntity.HasTag(GAME_TAG.CONTROLLER) &&
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging Hearthstone Deck Tracker/LogReader/Handlers/TagChangeHandler.cs
Auto-merging Hearthstone Deck Tracker/LogReader/Handlers/PowerGameStateHandler.c
s
Auto-merging Hearthstone Deck Tracker/IGameHandler.cs
Auto-merging Hearthstone Deck Tracker/GameEventHandler.cs
Applying: add remaining paladin secret tracking
Applying: remove click-to-gray, respect setting
Applying: changed GameEventHandler.HandlePlayerAttack to consider attacker and d
efender,
Using index info to reconstruct a base tree...
M HDTTests/HDTTests.csproj
M Hearthstone Deck Tracker/GameEventHandler.cs
M Hearthstone Deck Tracker/IGameHandler.cs
M Hearthstone Deck Tracker/LogReader/Handlers/TagChangeHandler.cs
<stdin>:301: trailing whitespace.
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging Hearthstone Deck Tracker/LogReader/Handlers/TagChangeHandler.cs
Auto-merging Hearthstone Deck Tracker/IGameHandler.cs
Auto-merging Hearthstone Deck Tracker/GameEventHandler.cs
CONFLICT (content): Merge conflict in Hearthstone Deck Tracker/GameEventHandler.
cs
Auto-merging HDTTests/HDTTests.csproj
Failed to merge in the changes.
Patch failed at 0005 changed GameEventHandler.HandlePlayerAttack to consider att
acker and defender,
The copy of the patch that failed is found in:
d:/SourceCode/GitHub/Hearthstone-Deck-Tracker/.git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
遇到冲突后,rebase暂停,CONFLICT (content): Merge conflict in Hearthstone Deck Tracker/GameEventHandler.cs
找到原始的版本库的合并节点SHA-1: abc0e44f72a4f73523a202c9ee77c8622c1e9fbc

双击GameEventHandler.cs文件

所以,可以换种处理方式,前面冲突的话,全部用temp1本身的的。
Administrator@LUJUNTAO /d/SourceCode/GitHub/Hearthstone-Deck-Tracker/Hearthstone
Deck Tracker (temp1|REBASE 5/16)
$ git rebase --continue
Applying: changed GameEventHandler.HandlePlayerAttack to consider attacker and d
efender,
Applying: SecretTests: added more SingleSecret tests, simplified secret verifica
tion
Applying: SecretTests: fix minion CARDTYPE
Applying: refactor HandlePlayerAttack, fix misdirection
Using index info to reconstruct a base tree...
M Hearthstone Deck Tracker/GameEventHandler.cs
M Hearthstone Deck Tracker/Hearthstone/GameV2.cs
Falling back to patching base and 3-way merge...
Auto-merging Hearthstone Deck Tracker/Hearthstone/GameV2.cs
Auto-merging Hearthstone Deck Tracker/GameEventHandler.cs
CONFLICT (content): Merge conflict in Hearthstone Deck Tracker/GameEventHandler.
cs
Failed to merge in the changes.
Patch failed at 0008 refactor HandlePlayerAttack, fix misdirection
The copy of the patch that failed is found in:
d:/SourceCode/GitHub/Hearthstone-Deck-Tracker/.git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
这样处理完之后,temp1拼接在了chucklu_master分支后面,此时切换到chucklu_master分支
合并的时候,不会产生冲突
所以在合并的时候,需要选择不提交 no commit。
然后再去手动将本应该冲突的文件修改为之前的合并结果中的文件,进行提交
把合并结果abc0e44f72a4f73523a202c9ee77c8622c1e9fbc中的文件内容全部复制出来,作为冲突合并的结果。完全复制到冲突的那个文件中替换掉。
最后一次才用最终的合并结果
补充说明,重新尝试了一次,虽然冲突
但是使用tortoisegit进行对比的时候,发现向下浏览的冲突按钮next confilict,是无效的
直接save,并且标记冲突为解决
git整理纷乱的历史合并记录的更多相关文章
- 『现学现忘』Git基础 — 24、Git中查看历史版本记录
目录 1.查看详细的历史版本记录 2.简化显示历史版本记录 3.历史版本记录常用操作 (1)指定查看最近几次提交的内容 (2)以简单图形的方式查看分支版本历史 (3)翻页与退出 4.查看分支相关的版本 ...
- git删除所有历史提交记录,只留下最新的干净代码
git删除所有历史提交记录,只留下最新的干净代码 1.Checkout git checkout --orphan latest_branch 2. Add all the files git add ...
- Git 删除所有历史提交记录方法
Git 删除所有历史提交记录方法 切换分支 git checkout --orphan latest_branch 添加所有文件 git add -A 提交更改 git commit -am &quo ...
- GIT入门笔记(8)-- 查看历史提交记录/根据版本号回到过去或未来
在Git中,用HEAD表示当前版本,也就是最新的提交版本, 上一个版本就是HEAD^, 上上一个版本就是HEAD^^, 往上100个版本写100个^比较容易数不过来,所以写成HEAD~100. Git ...
- git 仓库中删除历史大文件
git 仓库中删除历史大文件 在git中增加了一个很大的文件,而且被保存在历史提交记录中,每次拉取代码都很大,速度很慢.而且用删除 提交历史记录的方式不是很实际. 以下分几个步骤介绍如何减小.git文 ...
- Git 分支 (二)合并
分支的新建与合并 让我们来看一个简单的分支新建与分支合并的例子,实际工作中你可能会用到类似的工作流. 你将经历如下步骤:1. 开发某个网站.2. 为实现某个新的需求,创建一个分支.3. 在这个分支上开 ...
- Git 初始化项目、创建合并分支、回滚等常用方法总结
就在刚才查看资料时候, 看见一句话, 写的特别好: 当我的才华撑不起我的梦想的时候, 应该安静下来学习 配上我最喜欢动漫的一个角色: 红莲 1. Git 初始化项目 1). 创建新的知识库 echo ...
- git log 查看提交历史
文章出处http://blog.csdn.net/wh_19910525/article/details/7468549 git log 查看 提交历史 在提交了若干更新之后,又或者克隆了某个项目 ...
- git入门五(分支合并冲突和衍合)
分支合并冲突的处理 合并分支的冲突时在不同的分支中修改了同一个文件的同一部分,程序无法把两份有差异的文件合并,这时候需要人为的干预解决冲突.当前处于master 分支,当dev 分支和master ...
随机推荐
- Web前端新人笔记之了解Jquery
与javaScript相比,Jquery更简洁.浏览器的兼容性更强,语法更灵活,对xpath的支持更强大.一个$符就可以遍历文档中各级元素.例:在页面上有一个无序列表,我们需要将所有列表项中的文本内容 ...
- NGINX+UWSGI 莫名发生Nginx 502 Bad Gateway错误的排查过程
自己有个阿里云UBUNTU运行的Django站,使用NGINX+UWSGI驱动,今天登陆系统后台更新内容出现了几个大字:Nginx 502 Bad Gateway,一看情况不好,这是要糟糕啊. 啊西八 ...
- Get vertical scrollbar width and example
$.scrollbarWidth = function () { var parent, child, width; if (width === undefined) { parent = $('&l ...
- chrome jsonView插件安装
chrome 应用商店打不开,想装插件愁死人了. 今天想到一个好方法,以 jsonView插件为例分享一下. 1.打开 https://github.com : 2.搜索 jsonView 链接:ht ...
- JavaScript加强之自定义callback示例
callback回调函数在本文以自定义的方式出现. html: <select id="select"> <option value="111& ...
- Delphi Base64 编解码函数
Delphi 自带 Base64 编解码的单元, EncdDecd这个单元提供两套四个公开函数: 对流的编解码:procedure EncodeStream(Input, Output: TStrea ...
- PAT Ranking (排名)
PAT Ranking (排名) Programming Ability Test (PAT) is organized by the College of Computer Science and ...
- Educational Codeforces Round 12 E. Beautiful Subarrays 预处理+二叉树优化
链接:http://codeforces.com/contest/665/problem/E 题意:求规模为1e6数组中,连续子串xor值大于等于k值的子串数: 思路:xor为和模2的性质,所以先预处 ...
- Android中的时间日期选择器
1.layout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xml ...
- /****************** Attributes ********************/
/*预定义字符属性的文本.如果钥匙不在字典,然后使用默认值,如下所述. */ 以下属性是IOS6的 NSVerticalGlyphFormAttributeName NS_AVAILABLE_IOS( ...