I have a girl friend I want to marry her, but I have gone with her and it was anal sex. Can I be forgiven by Allah because I have put an end to it? Can I marry her?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Know that having anal sex with a wife is one of the major sins. Sex outside of marriage is Zina (fornication or adultery) and the participants should be punished. If they are single, then they should be lashed for one hundred times; if they are married, then they should be stoned to death.
Thus, you are required to repent and regret earnestly, without intending to return to the same sin. Then, Allah willing, you will be forgiven by Him as stated in the Quran.
As for marrying her, if she repents and regrets earnestly, then it is allowed for you to marry her. To avoid difference among scholars, we advise you to avoid marrying her if she has not repented, since some of them prohibit marrying a woman who committed Zina.
Allah Says (what means): {The fornicator does not marry except a [female] fornicator or polytheist, and none marries her except a fornicator or a polytheist, and that has been made unlawful to the believers.} [Quran 24: 3]
Allah knows best.
You can search for fatwa through many choices