Pawing is an annoying and sometimes painful method that dogs naturally use to request attention. It can be painful or even dangerous if the German shepherd swipes its big paw across the face of a toddler or the fragile skin of an elderly person. German shepherds are large enough to actually knock someone down just by pawing for attention. Pawing can ruin clothing, furniture and stockings. It's a habit that is easier to prevent than to break, as is the case with most canine bad habits, but it can be broken with the proper steps.
Ignore your shepherd when it paws you. This is easier said than done, but ignoring the dog is the only way to stop the cycle of pawing equaling attention to the dog. Negative attention is still attention, so no reaction at all is best, and if that is not possible, get up and walk away without a word. Never pet or feed the dog when it is pawing you.
Teach your German shepherd an appropriate way to ask for attention. This could be sitting and looking at you or moving to a particular spot, such as by your favorite chair -- anything that works well for you and will be appropriate in all situations. To teach this, you must give the dog attention every time it asks in the appropriate way. It doesn't always have to be a lot of attention, but reward the dog's appropriate request immediately, so that it makes the connection between its request and the attention from you.
Teach your dog a command for whatever it should do to ask for attention. Simply say the command at the moment that the dog makes its request. For example, if you want the dog to sit and make eye contact when it wants attention, when it does that immediately give the command -- such as "ask me" -- and reward it with attention and praise. Offer a training treat along with the attention as often as you are able. Try carrying some in a baggie or treat cup so you usually have the treats handy when your dog requests attention.
Give the command you've taught instead of ignoring the dog, if it paws at you. Once the shepherd has learned the command for requesting attention, teach it to replace the inappropriate pawing with the appropriate method. If it paws at you, give the command once. If the dog obeys the command, reward it immediately with attention and a treat. If the dog paws you again, walk away without saying anything else.
Try a different approach. If your shepherd is not too rough with its pawing, you may want to try teaching the dog a command, such as "shake," for pawing. Whenever the dog is about to paw you, give the command and hold your hand out to catch the paw. When the dog will shake on command, even if it wasn't about to paw you, then start teaching a stop or all done command. Eventually you can give the all done command when the dog is about to paw you, and gradually, the pawing will stop. This works well with some dogs, but the dog will still always want attention, and so it's much slower stopping the pawing with this method.