Putting Green
You may remember Rory McIlroy being penalised for brushing sand from his line in Abu Dhabi a few years ago, but that was because the sand was on the fringe where you are not allowed to touch it.
Loose impediments such as twigs, cones, leaves, stones (and of course, sand) may be removed or brushed away using whatever comes to hand – cap, towel, hand or even your putter provided you don’t press down on your line in doing so.
In terms of your line of putt, you can repair pitch or ball marks, but not spike marks as The R&A feels that if players were allowed to repair every imperfection on their line, play would grind to a halt even more than it already has done!
Contrary to what some people believe, you may have the flagstick tended when your ball lies off the putting green as well as on it, and you can hold the flagstick in one hand while tapping the ball in with the other should you so desire, as long as it has been removed from the hole and your ball doesn’t strike it.