Typically you'd level and compact an area for the pole barn, then put in the holes for the poles.
I've seen situations where they've used longer poles on the downhill side, put in some sort of retaining wall, and then fill inside the pole barn once it is built. But it is a heck of a lot easier...