The pros and all the people who have fitness websites would probably tell you to repair it with the kit that you should always have with you and they inform you of the benefits of this kit right before they give you a link where you can order said kit so they get a commission. They would probably also tell you to always carry a hand pump that as luck would have it! They also happen to sell that product linked in the description with a "discount code" as well.
That's all fine and dandy and while I do in fact relish the idea of removing a tire from my bike on the side of the road and then engaging in a patch in the sun when I am just a few km from my house, I don't think most people who exercise slightly more than the average human are actually going to be carrying all this crap with them.
For me, I get flats a couple of times a year and yes, it is super annoying. I have used a method that the experts selling the above packs as well as many other things would probably disagree with, but I have used this method many times and did no more damage than just busting the innertube, which is actually really inexpensive to replace.
WARNING!
This information is based on my own experience and almost all websites (who are trying to sell you something) will tell you probably to NOT do what I am suggesting. I have done it multiple times out of sheer stubbornness and because the alternative involved calling someone in or going on a long walk with the bike rolling beside me, neither of which I was prepared to do.
First off, your strategy needs to be different depending on which tire has gone flat and the solution that I have used is stupidly simple and also give a different kind of workout than you are likely used to getting on a bicycle.
If the back tire is flat shift your weight to leaning forward and standing over the handlebars. If the front tire is flat, do the opposite.
Physics dictates that this isn't going to put ZERO weight on the tire that is flat, but it appears to put significantly less.
Also, you want to always be traveling in a straight line and this is fine for roads, but off road or on winding paths this isn't going to work so well.
next, use a high (harder) gear and just take it easy. You will likely start to hear the tire making contact with "something" after time but just stop and check every now and then.
Obviously you are going to be going significantly slower than you normally would and this is going to take a lot more energy than it would take if the tires were in good shape.
yesterday, I was on a ride and was 10km from home when i noticed a flat. I did not have my hand pump with me and not many other people were around. After asking the few other cyclists if they had a hand pump (they did not) I resigned myself to riding on it and just shifting my weight away from the flat and taking it easy.
Every km or so (up to you man!) stop and check to make sure that you are not damaging the rim (the metal actual tire with the spokes). This is a quite expensive part of the bike and you'll likely regret your decision to not just give up and walk at that point. innertubes are basically free and if you are not putting a bunch of weight on the rubber exterior tire the chances of you destroying the outer tire is pretty small also. Hell, even if you did slightly damage it the air pressure in a tire is maintained by the innertube anyway, not the tire, so you will likely be able to continue using it.
Of course, the smarter alternative would be to not be an idiot like me and just get a small hand pump and strap it to the bike. Almost all of them come with a bracket that is designed to fit behind your water bottle holders. The range of prices on these things are a few dollars to hundreds of dollars (total waste of money on the higher end ones - it's a friggin air pump) and normally I would have one of these with me and it is was my own arrogance and stupidity alone that is why I didn't have it this time.
Point of the story is that you aren't really all that screwed if you do get a flat out of nowhere and yes, you (we I can) can ride on on it if you are willing to put your body in a slightly uncomfortable position to spare the bike damage.
The amount of strain that you are going to put on your body by shifting your weight like this will be more than enough convincing for you to remember to bring your hand pump in the future, I can guarantee you that. Although there is always the very real possibility that the puncture that you got will be too big for the hand pump to make any difference at all but in my experience and years of cycling, almost all punctures are slow leaks and a pump up on the side of the road will definitely get you home, even if you have to stop a few times to re-do it.
Look at the bright side if it does happen: you are now getting an upper body workout as well.
Since I sell nothing and seek to make no money out of this, just look for a bicycle hand pump on whatever store. I have many of them and for the most part there isn't a great deal of difference from one to the next, despite their claims.