It’s not that likely you’re going to make it up every hill you attempt to ascend in your 4wd vehicle. In this circumstance, you’re going to want a way to get back down the hill to try again.
Often people will jump straight onto the brakes once they realise they’re not going to make it all the way up the hill. As it is dangerous to try to turn the vehicle around whilst on top of the hill, they will then attempt to leave the vehicle in neutral and use the brakes all the way back down the hill.
What people don’t realise is that this is very similar to descending a hill forwards. In all circumstances you will want to do this in gear and in control of the vehicle using the engine compression to brake the vehicle back down the descent.
Place the vehicle in reverse gear, leave the transfer in low range and let the engine compression do the braking for you. Do not be tempted to touch the brake pedal or clutch pedal. If you find you are sliding down the hill, gentle application of the accelerator pedal can give you the needed traction to steer the vehicle.
Here’s an example of sliding back down the hill on the brakes.