Any time you have major colon surgery, a low-residue diet is recommended for the first weeks after the surgery. This helps the colon to heal by reducing the work it has to do. Think of it as someone trying to juggle while their broken arm is in a cast - it can be done, but it puts a lot of stress on the broken arm. This is fine for a while, but a low-residue diet is generally an overall unhealthy diet, so after a time (your doctor or a dietician can tell you how long) you start introducing other foods until you are basically back to your pre-surgery diet. Adding back salads, grains, fruits and vegetables will not only be a healthier diet, but a less boring and more satisfying one as well. Occasionally, you will find a food that your newly shortened and somewhat constricted system won't tolerate, and you just eliminate them from your diet. For me, that was popcorn. With a peristomal hernia to accompany the stoma, those little suckers would swell up and compact and cause a painful near-blockage that would take hours to pass. So now, I just don't eat popcorn anymore. (Sad sigh.) Oh well.
Good luck, and may you find very few foods you can't eat anymore.