Assalamu Alaykum.
Let's say, a guy commits sin but he repents. He keeps continuing what he does and still repents. At last, he finally realizes how much sin he has been doing so he repents SINCERELY AND tells Allah(SWT), "If I commit the sin again, don't forgive me..." (along those lines). He commits the sin again and wants to repent but feels like Allah(SWT) won't forgive him because of what he said.
Can Allah(SWT) still forgive him?
Yes, but it was a mistake of him to say what he did, Allah accepts the repentance providing that the repentance is sincere. The conditions for a repentance to be sincere is the following
Repentance is essential from every sin, even if it is something between a person and Allaah and has nothing to do with the rights of another person. There are three conditions of repentance:
1- You should give up the sin
2- You should regret having done it
3- You should resolve never to go back to it.
If one of these three is missing, then your repentance is not sincere. If the sin has to do with the rights of another person, then there are four conditions: the three mentioned above and restoring the rights of that person. If it is money or property, etc, it must be returned to him; if it had to do with slandering him etc, then you should allow him to insult him in return, or ask for his forgiveness; if it had to do with backbiting about him, then you have to ask for his pardon. It is essential to repent from all sins; if a person repents from some, his repentance from the sins from which he repented is valid – according to the scholars who follow the right path – but he must still repent from the rest as well.
End quote.
Based on the above, if these conditions are met by the person who is repenting, then there is the hope that his repentance will be accepted, by Allaah’s leave. After that he should not worry about waswaas (whispers) suggesting that his repentance is not accepted, because that is from the Shaytaan and is contrary to what Allaah and His Messenger (peace and blessings of Allaah be upon him) have told us, that repentance is accepted if it is sincere.
Read full link here
http://islamqa.info/en/ref/46683