I hate to rain in this parade of insightful tips and tricks for surviving a bear attack with some true stories from family that they've shared with me ... but... my aunt's brother-in-law was on a hunt in Alaska and got attacked by a bear. He had .44 in a chest rig but didn't have time to get it out before it was on him. At that point he decided "oh well" and shoved his fist as far into its throat as he could. He was pretty beat up and his arm was pretty torn up, but it got the bear to take off and he's still alive.
Another way to get rid of an attacking bear is to jump on its back. My uncle made the local paper in his little town on the coast of Alaska for "riding" a bear. He was blacktail hunting and saw a bear going up the opposite side hill a out 100 yards away. It stopped sniffed the air and came running right at him. Of course he only had one round left in the gun. So he waited until it was about 20 yards yards away and fired. The bear did slow, so he grabbed the rifle by the barrel and baseball style clubbed it over the head breaking his stock. As he was running to get behind a big tree, he tripped right onto his stomach and thought of all the stories of bears grinding their teeth on the back of people's skulls while they lay there, and he did NOT want that to happen, so he pushed himself up as hard as could with his arms and legs just as the bear was coming down on him. For just a split second he caught a face and a couple handfuls of fur before the bear took off as quick as it could. His brother's that were a couple hundred yards away hear the yelling, the bear, and the shot, but thought he was telling stories until they looked and saw his stock busted in two.
I made him tell me that one in person last year because I had heard a couple different versions over the years.