If your chain snaps and you have no tool to repair it, just tie the loose ends together with some thin string, wire or zip tie that will go between the rollers and links or even the holes in the links, ensure that you are in an easy gear and that part of the chain is at the bottom between the chain ring and bottom jockey wheel where no pressure will be put on it and your pedal for your strongest leg is in about the 2 o'clock position and half pedal all the way home making sure the broken part does not go round the jockey wheel or chain ring, it may be tiring but it beats walking. I've only had to do it once about 40 years ago, mid winter in the dark, it was a quick flash of inspiration....and a long length of fishing line to repair the chain that saved me from pushing a fully laden bike with fishing tackle 7 miles
Luckily, I had no big hills to climb, but you can always walk the hard bits.