If you get stuck, first face TOWARDS the wall you are stuck in, and push the space bar and the g button once or twice to move backwards a couple of steps and get unstuck. Be careful about when you use this because you can only use it a couple of times per level to prevent people from going backwards all the way through anything.
Cheat version of Elephants Don't Jump by @Elephants4Ever