Narrated Abu Hurairah: I heard the Prophet, peace be upon him, saying, “If somebody commits a sin and then says, ‘O my Lord! I have sinned, please forgive me!’ His Lord says, ‘My slave has known that he has a Lord Who forgives sins and punishes for it. I therefore forgive my slave (his sins).’
Then he remains without committing any sin for while and then again commits another sin and says, ‘O My Lord, I have committed another sin, please forgive me.’ Allah says, ‘My slave has known that he has a Lord Who forgives sins and punishes for it. I therefore have forgiven my slave (his sin).
Then he remains without committing any other sin for a while and then commits another sin (for the third time). And (he again) says, ‘O my Lord, I have committed another sin, please forgive me.’ Allah says, ‘My slave has known that he has a Lord Who forgives sins and punishes for it.’ I therefore have forgiven My slave (his sin), he can do whatever he likes’.” [Allah will forgive one’s sins if one repents.]
[9: 598- O.B. Sahih Al-Bukhari)