If Clause

A. If Clause: Present Tense

a. In clauses with time words: when, after, until, we often use the present tense forms to talk about the future. (e.g. I’ll come home when I finish work.) In conditional clauses with 'if' we often use the present tense forms to talk about the future. (e.g. We won’t be able to go out if it is raining.)
b. We do not normally use 'will' in clauses with 'if' or with time words. (e.g. I’ll come home when I finish work. (not when I will finish work))
c. but we can use will 'if' means a promise or offer. (e.g. I will be very happy if you will come to my party.)
d. imagine something: 'if + past' (if I found/ if I was/ if we didn't etc.) but meaning is not past. (e.g. What would you do if you won a million pounds? (we don't really expect this to happen.))
e. We do not normally use 'would' in the 'if-part' of the sentence. (e.g. I'd be very frightened if somebody pointed a gun at me. (not if somebody would point)) But you can use 'if ~ would' when you ask somebody to do something. (e.g., (from a formal letter) I would be grateful if you would let me know your decisions as soon as possible.)
f. In the other part of the sentence (not the if-part) we use would ('d)/ wouldn't. (e.g. If you took more exercise, you would (= you would) feel better)
g. ‘could’ and ‘might’ are also possible. (e.g. If you took more exercise, you might feel better. (= it is possible that you would feel better.)
h. Do not use when in sentences. (e.g. They'd be upset if I didn't go to their party. (not when I didn't go))

A1. If Clause: Future Tense

a. Some clauses with ‘if’, use past tense forms to talk about the present and future, for something that has not happened or is not happening. (e.g. He could get a new job if he really tried = He cannot get a job because he has not tried.)
b. We use the past tense forms to talk about the future in clauses with ‘if’, for something that we believe or know will not happen. (e.g. We would go by train if it wasn’t so expensive = We won’t go by train because it is too expensive)
c. and to make suggestions about what might happen. (e.g. If he came tomorrow we could borrow his car.)
d. When we are talking about something which did not happen in the past we use the past perfect in the ‘if clause’ and a ‘modal verb’ in the main clause. (e.g. If you had seen him you could have spoken to him = You did not see him so you could not speak to him.)
e. If the main clause is about the past we use a modal with have. (e.g. If you had seen him you could have spoken to him. = You did not see him so you could not speak to him.)
f. If the main clause is about the present we use a present tense form or a modal without have. (e.g. If I had got the job we would be living in Paris now. = I did not get the job so we are not living in Paris now.

more about If and Wish