Summarize this article:

If you're going to be on trails with steep drop-offs or rocky cliffs and your dog will be off-leash, it's better to have a dog that watches her step and has good balance than to get a dog that in her excitement might slip and fall. An agile dog will be an excellent companion for hiking because they'll be able to navigate tricky paths and trails without much assistance from their owner. Some dogs that fall in this category include:  Weimaraner Akita Dogs that are easy to train usually make excellent hiking companions because they can learn the trails and how you expect them to behave quickly. They will also usually interact well with other hikers and dogs. Some of these breeds include:  German Shepherd Labrador Retriever Norwegian Buhund Some dogs (like the Pitt Bull and Rottweiler) are prone to aggression unless trained very diligently. Others are difficult to train – like Huskies and Akitas. Be careful when choosing one of the following breeds as a hiking partner:  Pitt Bull Rottweiler Shiba Inu Husky A greyhound or a whippet, for example, will probably not enjoy a 10 mile (16 km) hike because they are bred for sprinting, not endurance. Additionally, flat-faced breeds such as English Bulldogs will struggle to breathe on long hikes and in hot weather, and so generally shouldn't undertake endurance activities. Some breeds with high endurance include:  German Shepherd Chesapeake Bay Retriever
Find a breed that is agile. Choose an easily trainable dog. Be cautious about certain breeds. Look for a dog with good endurance.