It may not seem like a big deal to let a Yorkie jump on someone. When a German shepherd jumps, however, because most GSDs are so big, it can be a serious issue (despite the fact that both behaviors are bad and should be corrected).
Dogs do this because they are excited and sometimes even to show dominance. Whatever the reason, if you have had enough of your dog putting holes in your shirts and scratching your arms and legs with his nails, here is what you can to do stop your German shepherd from jumping on people:
Ignore your dog when you get home.
Even if your dog is jumping on you and is excited and asking for your attention, do not give it to him. Instead, when he jumps on you, move him off of you and put his feet back on the ground. If he jumps again, do this again. Do this repeatedly until he learns that jumping on you when you arrive home is not going to earn him any attention or affection.
Tell your dog to sit when guests come over.
Instead of allowing your dog to greet your guests at the door. Tell him to sit. If you have established yourself as the pack leader, he will do as he is told, no matter how excited he is to see who is at the door.
Tell your guests not to acknowledge your dog when they come over.
Just as you do when you come home to a jumping dog, tell your guests not to greet your dog until he has all four feet on the floor and is being polite. Again, this reinforces that your dog will only get affection when he doesn’t jump on someone.
It might not be fun, especially because you love your dog and want to give him attention the moment you get home, but if your dog is jumping on someone, he needs to be continually corrected by every person he jumps on.
These same tips can be used if your dog jumps on you while you are feeding him or to try to snatch food or a treat out of your hand. Every single time, push him off of you and make sure his feet return to the floor and reward him only when he behaves properly.