It doesn't matter if it was you or her who ended the relationship, what matters most is you focus your energy in getting your girlfriend back.
If you really want your relationship to work then here are a few tips to get you started: Send her flowers with a sweet sorry note at her workplace or at school - anywhere as long as her friends can see that you sent one.
This will make her feel good, courtesy of you.
Give her a call and gauge if she's still upset or not.
If she's still upset, then be brief with your conversation just enough to show her you are serious in asking for her forgiveness.
Allow her space to breathe and think.
She might still be overwhelmed with the things going on between you two.
This way you are showing you are supporting her emotions.
It's enough (for now) that you said you're sorry.
Mean what you say and make sure she knows it.
Do not vanish, be in contact with her but do not be too pushy to the extent of looking like a stalker.
When you think she's warming up to you, then it's time to ask for a coffee date.
Start it out with light conversation and catching up.
Then if both of you are ready, you can talk about the reasons of your failed relationship.
It's also best if you're clear on your intentions in getting your girlfriend back.
So as to know that way both of you are on the same page.
Accept your mistakes and learn to compromise.
Be sensitive to each other's wants and needs.
Finally, gain her trust and never ever break it.
It's the hardest mistake you'll ever make if you betray her trust.
In the end, it's your willingness to fix things with your girlfriend that will make you think of ways to get her back as well as the courage to do anything to win her.
Most of all your sincerity to patch things up will ensure a happy reconciliation and when things are the way you want it, make an effort to nurture your relationship.