A non-finite clause might better be defined as a clause headed by a non-finite verbform: an infinitive or a participle. Such a clause by definition1 has no tense. It cannot be the main or matrix clause in a formal sentence, because a matrix clause must be headed by a finite verbform, which defines its Reference Time—the time you are talking about. (see the discussion of tense here.)
Consequently, non-finite clauses only appear in formal sentences as subordinate clauses. Their temporal reference is inferred from context. In most cases that temporal reference is to the Reference Time defined by the matrix clause:
To think this makes him more cheerful may be paraphrased as
That he thinks this makes him more cheerful or
When he thinks this it makes him more cheerful.
A non-finite perfect construction—one in which the HAVE component is cast as a non-finite verborm—works the same way. (Keep in mind that the tense of a perfect construction is expressed by the HAVE component which heads it: a present perfect signifies a present state, a past perfect signifies a past state. Those states, current at Reference Time, arise out of the prior eventuality mentioned by the past participle component.). The semantics of think make it sort of odd in this context, so let's look at do instead.
To have done this makes him more cheerful may be paraphrased as
That he has done this makes him more cheerful or
When he has done this it makes him more cheerful
In the right context, infinitive clauses (including infinitive perfects), readily bear a future reference. For instance:
To think this this will make him more cheerful tomorrow.
To have done this will make him more cheerful in his old age.
1 ‘by definition’ because an English non-finite verbform is defined as one which is not marked for tense. Note that tense here is used in the technical sense “morphologically marked temporal reference”; English has, in this sense, only two tenses, past and non-past.
Sometimes the gerund and infinitive forms are interchangeable; sometimes they are not. Your examples above ("travelling", "dancing", "getting") are all examples of interchangeable usage. Here are examples where interchanging alters the meaning of the sentence:
"Travelling" vs "to travel":
- He remembered travelling to Canada. (He has traveled to Canada, and
now remembers that.)
- He remembered to travel to Canada. (He was supposed to go to Canada, and then he did.)
"Dancing" vs "to dance":
- She stopped dancing. (She never danced again.)
- She stopped to dance. (She interrupted an activity to begin dancing.)
How do you know when the gerund and infinitive are interchangeable? Generally, gerunds are best for talking about completed actions, and infinitives are best for talking about incomplete or future actions.
Gerund: I was getting up earlier last week. (The getting up already heppened.)
Infinitive: I want to get up earlier. (The getting up hasn't happened yet.)
Still, knowing which form to use requires some memorization and intuition. Here is a list of common verbs from http://www.gingersoftware.com/content/grammar-rules/verbs/gerunds-and-infinitives/:
Followed by a gerund:
admit, advise, avoid, be, used to, can’t help, can’t stand, consider, deny, discuss, dislike, end up, enjoy, feel like, finish, forget, get used to, give up, go on, have difficulty, have problems, have trouble, imagine, it’s no use, it’s worthwhile, keep, look forward to, mention, mind, miss, recommend, remember, quit, spend time, stop, suggest, understand, waste time, work at
Followed by either a gerund or an infinitive without causing a change in meaning:
begin, continue, hate, intend, like, love, prefer, start
Followed by a gerund or infinitive but with a change in meaning:
forget, remember, stop
Followed by an infinitive:
afford, agree, appear, arrange, ask, care, decide, demand, expect, fail, forget, hope, learn, manage, mean, offer, plan, prepare, pretend, promise, refuse, remember, seem, stop, volunteer, wait, want, wish
Followed by a noun or pronoun and then by an infinitive:
advise, allow, ask, cause, challenge, command, convince, expect, forbid, force, hire, instruct, invite, order, pay, permit, program, remind, teach, tell, urge, want, warn
Best Answer
I would say there's no significant semantic difference between OP's exact two examples, but in certain specific contexts one or the other would be more "idiomatic".
1.) If you were sitting in a hotel having an early "working breakfast", you'd be more likely to use #1 (with the meaning *"Did you like getting up early this morning?").
2.) The hotel manager wanting to know if his guest would like an early or a late breakfast the next day would be more likely to use #2 (with the meaning *"Will it suit you to get up early tomorrow morning?").
Thus, although I don't see any distinction based on "repetition", there is a distinction based on the fact that the gerund/present continuous ("Do you like doing this?") is a better choice when the person you're asking is currently doing whatever it is.
The difference becomes clearer if we change the activity from getting up early to being here...
Where #4 is unlikely because (as explained above) we normally use the first form when the activity being asked about is currently being performed (and usually we'd only be asking such a question if the person was in fact "here" at the time). But contrast that pair with...
In this case, #5 is more likely if you're asking someone who's currently at home, on Thanksgiving Day (or very close to it). Effectively, you're asking if the person likes their current circumstances.