内容提要
第一部分:commit hash是什么?
第二部分:merge是什么?
第三部分:rebase是什么?
最近一段时间我在学习如何使用Git,碰到的一个难点:如何区别merge和rebase?大部分人都能理解merge的概念,但是对于rebase就不是很清楚了。在这三篇博文中我将尽可能用最简单的方式来解释它们的异同。不过在此之前,我们需要先了解一下什么是commit hash。如果你看过自己...
分类:
其他好文 时间:
2015-05-06 01:30:33
阅读次数:
238
内容提要
第一部分:commit hash是什么?
第二部分:merge是什么?
第三部分:rebase是什么?
在第一部分中,我们讨论了什么是commit hash,其中一个很重要的特点就是commit无法被修改。hash值是根据存储在commit中的信息生成的,所以修改一个commit或者commit hash,你必须要创建一个全新的commit。我们还讨论了每一个commit存储了它的前一个c...
分类:
其他好文 时间:
2015-05-06 01:28:43
阅读次数:
125
内容提要
第一部分:commit hash是什么?
第二部分:merge是什么?
第三部分:rebase是什么?
在第一部分我们创建了一个小的demo仓库,它拥有着一个feature1分支,而且这个分支已经准备好要merge到master分支中了。此时,我们可以选择merge或者rebase feature1分支到master分支。关于rebase将会在第三部分进行介绍。现在我们来看一下,采用mer...
分类:
其他好文 时间:
2015-05-06 01:28:39
阅读次数:
155
题目:两个有序数组a和b,混合之,放在另一个数组c中,使得c也是有序数组(升序),去除重复的项。
虽然觉得不是很简便,但代码如下:
int merge_array (int *a , int *b, int *c, int n1, int n2)
{
if (n1 < 0 || n2 < 0) {
return -1;
}
int i = 0;
...
分类:
编程语言 时间:
2015-05-06 01:28:12
阅读次数:
177
【本系列转自】http://cn.cocos2d-x.org/tutorial/lists?id=79前言在本系列教程中,我会以当下最流行的2D引擎Cocos2d-x为基础,介绍OpenGL ES 2.0的一些基本用法。本系列教程的宗旨是OpenGL扫盲,让大家在使用Cocos2d-x过程中,知其然...
分类:
其他好文 时间:
2015-05-05 23:37:25
阅读次数:
261
Problem:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and retur...
分类:
其他好文 时间:
2015-05-05 19:36:52
阅读次数:
139
【题目】Given a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18].【analyze】1...
分类:
其他好文 时间:
2015-05-05 16:08:51
阅读次数:
121
在spark sql 1.2.x当中存在一个问题:
当我们尝试在一个查询中访问多个parquet文件时,如果这些parquet文件中的字段名和类型是完全一致的、只是字段的顺序不一样,例如一个文件中是name string, id int,另一个文件是id int, name string时,查询会报错,抛出metadata merge的异常。
在1.3当中,这个问题其实已经解决。那么在1.2....
分类:
Web程序 时间:
2015-05-05 14:32:34
阅读次数:
263
题目:
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together
the nodes of the first two lists.
翻译:
把2个有序链表连接,返回一个新链表
思路:
很简单,就是遍历每个节点,小的话添加在...
分类:
其他好文 时间:
2015-05-05 12:43:02
阅读次数:
126
Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:You may assume thatnums1has enough space (size that is great...
分类:
其他好文 时间:
2015-05-05 12:27:33
阅读次数:
118