Pets are one of our most precious possessions and often, our closest friends. Well trained dogs make great hiking companions but dogs are not allowed on the wilderness trails of Yosemite National Park.
Although dogs are allowed in the park and can be in designated campgrounds the National Parks are not exactly dog friendly, there are so many restrictions that dogs can't really be dogs.
If you want to hike with your dog visit the National Forests just outside Yosemite National Park. There are miles of dirt Forest Service roads & trails available for you and your dog to hike. In most areas of the National Forest dogs can be off leash if the owner can control the animal with voice commands.