Mini Git merges histories by relinking
while (curr.past != null && other.head != null) { if (curr.past.timeStamp < other.head.timeStamp) { Commit temp = curr.past; curr.past = other.head; other.head = other.head.past; curr.past.past = temp; } curr = curr.past; }if (other.head != null) curr.past = other.head;