It will help when changing gears on a hill to:
1) anticipate the hill and drop to the smallest sprocket on your front sprocket before hitting the hill.

2) when changing the gears on the front sprocket, have the gear on your rear cassette in the mid range and this will help a lot to keep your chain from coming off.

Hope this helps.