This may make some cringe but I've gotten away with it many times.
Even an anal retentive dry fly fisherman can have a back cast go array and there were times (most notably when I would creep into position on a small stream) when I would snag a fly that I did not intend for loss up in a streamside tree beyond my reach.
You let out slack line and reach up with the butt section and reel, snag the offending limb, and pull it down until you can get a hand on it.
Then there's the 'tip top' retrieve; I use this for underwater snags. You guys know this one............ reel in until you can get the eye of the hook to come through the tip top and then push the hook point free of the wood you're stuck on. I don't recommend this if you are stuck in rocks but you can do it. You just have to be very conscious that the rocks will break your tip if you slip up. Amazing what you can reach with a 15' rod
I do not recommend this if you are prone to things going wrong but it has worked many times for me. Other than a brief period when I was using heavy flies and shot to dredge for salmon in the 90's, I have not been the guy who lost a bunch of flies. Actually I have a problem with it, I don't tie them or go fishing to lose flies and I have a good record.
I'm thinking as I write, and this season I lost................. 3 and had one damaged while removing it from a salmon who was resisting our efforts to release him. I remember the flies I lose. I snapped off a Freight Train with a bad cast
I had a knot fail when perhaps the largest trout of the year got around a submerged tree and went crazy being tethered to the limb. The knot just couldn't take it. And, I left a brand new (unused) articulated Sculpin that I had great plans for lay on top the console of the boat and then drove up river at about 30 mph. The one that came apart happened when the fellow removing the hook got hold of the wing.........
I know this looks like a thread hijack but hey, I answered the question before I started telling stories, right? There was another incident that I almost needed therapy for. I left a Plano box with '18'
of the most beautiful tube flies and Intruders in it sit on the back of the boat when I left a launch area
These were a gift and I had used only one of them at that time. That one fly had caught a dozen fish and was good as new! I searched the roadside every day that I went out of that launch but they were gone for ever. I may not lose many while fishing but that was the single biggest tragedy / loss I've ever had regarding fishing tackle.
Be careful if you use your rod as a fly retriever