You have an employee who doesn't need to be scared out of their minds by a trip up to HR about their job performance. Instead, you need to do your thing, as a manager, to get them flying straight; HR is a last ditch attempt at fixing things, and, quite frankly, as a manager its' part of your job to prevent things from going that far if you can prevent it.
The first thing to think about is, when did the behavior you've noticed start? Has this always been a problem with this person and it's just becoming an issue now, or did it just start in the last few weeks?
If it's always been an issue and just got worse recently, or just started recently, there's probably a catalyst for the bad behavior that you can isolate; if it's about the time the server started going down like a five dollar whore, you can probably curb the behavior by talking to the person about it and getting a new server. If it's because your employee is getting a divorce or a loved one has passed, then you can treat them more gently and give them more benefit-of-the-doubt in resolving the issue; the thing that is causing or being exacerbated by the bad behavior is not going to last forever, but it will be a while and you need to be supportive. If there doesn't seem to be any precipitating cause, or worse, this is how they've always been, you have a harder road in front of you: moving people out of established bad habits is hard work, and usually considerably less successful in repairing. The longer someone does something the wrong way, typically the more resistant he or she will be to doing it the right way.
The next thing to think about is what exactly don't you like about the behavior. If he/she is deleting the source tree daily, that's pretty damn clear (and probably grounds to fire or put into a mental institution before the rest of your team gets hold of that person). If, however, its more of a way of saying words, word choice, or overall attitude, you need to break it down into something as concrete as deleting the source tree so you can show them what you don't like; if you can't provide a clear example of the behavior you don't want to see, there's no way for them to know what to change.
Next, you want to look at what behavior you would like to see. If, for example, your problem employee is Mrs. Negative--the glass is not only half full, it's also full of acid--you probably want to see, at the very least, a cessation of the majority of the negativity which means that you might want Mrs. Negative to be more quiet in group meetings unless she has something productive to say. An additional behavior you'd like to see is that she does have something productive to say--dreaming up what could go wrong is not bad behavior if you are also working out possible solutions to what could go wrong. Harping on a problem without solving the problem, however, is bad manners.
Talk to this person casually the first time, unless things have progressed to "seriously disruptive." An employee should not be penalized for a manager not noticing their bad behavior or for other employees not letting them know they don't like the behavior. While we assume (remember my earlier posts on assumptions?) that certain behavior is accepted as the norm and that any person should understand that, we all know that's not the case; otherwise teams would agree completely and no additional management would be required. It would also be a spooky world where we all had the same daily clothing choices as Ronald McDonald--the same shirt, tie, etc. Freaky. Fortunately, the world is not like that, and, unfortunately, employees are not psychic (or fortunately--they probably wouldn't be working for you if they were psychic as they'd be on a beach somewhere). If they don't know that they are doing something wrong, they cannot fix it. So, no matter how annoying it is, you have an informal conversation (maybe during your regular 1:1) to discuss it.
In that meeting, you cover what behavior needs to change, and what you'd like to see instead, and then you leave it ALONE. Hounding people who may be self-conscious about what you've just told them is poor form and also likely to undermine the result you actually want to get.
Its likely this person will show immediate improvement...and then, over time, may slip back into the bad habit. As soon as you see the regression, talk to them again. Again this is an informal discussion, with appreciation and notice of the hard work they've already put into this, but with a reminder that you saw the undesired behavior return.
If they slip up again, or, as noted above, if the issue is immediately seriously disruptive, you'll need to prep a little before you meet with them again. You'll need to define the problem and the steps taken to date to resolve it (previous meetings and suggested behavior). Then you'll need to create a step-by-step plan of things this person needs to do in order to alter that behavior, and a check-in date (or dates) after the plan is implemented so they can tell what their progress is and you can measure it, too.
This will not be the final form of this plan--that needs to be worked out by you and the employee, together. Someone honestly struggling with a behavior wants to be part of the solution for that behavior so they a) are invested and b) don't feel bossed around. If everything is coming from you, its way too easy for them to believe that the problem is also with you, and not them.
Then, meet with them. Go over the timeline of the issue, define the issue again, define what's been done, so far, unsuccessfully to resolve the issue, and then ask the person to help you brainstorm how to resolve this issue to both of your satisfaction by the date you've selected (which should be out by at least a week or two, preferably a few months, and which gives time for check-ins and improvement from those checkins). While you don't want to be threatening them at this time, you will need to tell them that you need to see improvement along the schedule to which they've agreed or you will have to take the next steps, which neither of you want to do. Next steps will be getting HR involved.
Next, work the plan. Give the person every chance at success that you can, as long as you feel they are giving their best to you. You may need to involve HR to help them get classes or training they need. Or, they may not be able to accomplish the goals they set out with you, and it becomes an HR exercise from there that you must monitor. However it goes, though, you know you will have done your best by them before you had to get the human resources team involved. Further, you'll have it all documented for HR.