I know this is an older thread, but I'd like to add some rules for a gunfight that I've learned over the years. Please keep in mind that this is from a force protection point of view rather than what people would usually think would be a military perspective on gun fighting. They were taught from the perspective of defending the ship or base and her people from outside threats.
1-4: Basic Gun Safety rules.
5: Mindset. Put your gun on with the knowledge that there is a possibility, however remote, that you will have to use it on another human being in defense of your own life. If you're not prepared for this, you shouldn't be carrying a gun. Stay aware of your surroundings and be running through "what if" scenarios in your mind. What would you do if someone came out of the alley up ahead to take your stuff at knifepoint, what if that guy over there pulls a gun on you, etc.
6: Know your deadly force triangle and let it be your guide. Justification for the employment of deadly force means that whomever you believe poses a lethal threat to you has the Opportunity, Capability, and Intent to inflict that harm. The guy with a knife saying he's going to kill you while he's standing behind the fence may have Capability and Intent, but he doesn't have Opportunity. The guy walking down the other side of the street with a rifle on his back certainly has Opportunity and Capability to inflict lethal harm on you, but he hasn't demonstrated Intent. And so on.
7: Just because you've pulled your gun out of the holster doesn't mean you have to shoot it. By no means expect your weapon to be a magic talisman that will ward off evil, but realize that some threats may well be deterred by the sight of it.
8: If forced to engage the threat, continue engaging until they are no longer a threat. Shoot until they are on the ground, shoot until they decide they've had enough and disengage. It may take one round or it may take every round you have. Do not continue engagement after they are no longer a threat.
9: Bullets are like words. Once spoken/fired, they can never be taken back and you own every one of them. This ties into Rule #2, Never point your weapon at anything you do not intend to destroy. Never shoot at a target if you are unsure of it or what is beyond it.
10: If you are justified to shoot someone to wound them, you're justified to shoot to kill them. Don't try to aim for areas like the arms or legs in an effort to wound your threat. You're in reasonable fear for your life. Engage the threat as such.
10.5: Shot placement matters. Shooting someone in the head may be necessary due to wearing body armor, not responding to rounds fired elsewhere, etc. This ties into rule #9. Be prepared to explain why you shot your threat where you did.
11: Action beats reaction. If it is a defensive shooting, you have already lost the initiative. Your object is to take the initiative back.
12: Mindset again. You're in a fight for your life. Go into it with the mindset that you are going to win by whatever means necessary. When I was in training, one of the instructors quoted an old Army study that found that fatally wounded soldiers were able to continue engaging the enemy for an average of 120 seconds before they died (Haven't been able to find that study since). Fight until the threat is over or until you have been incapacitated and cannot continue. Fight to win.
13: Never assume that the threat you see is the only one. Engage your threat and scan to see if there are others once it has been ended.
14: When it's over, render aid if possible. As lailr said, this may seem counterintuitive but it will hopefully go to show that your intent was not simply to kill the person that was trying to kill you. Be prepared to justify all of your actions.
These aren't set in stone rules to follow. These are the things that I keep in mind whenever I arm up to stand my post or whenever I strap on my CCW to go to the store. The last thing I'll mention is the time honored cliche of "train the way you fight, because you'll fight the way you've trained."
No one can tell what goes on in between the person you were and the person you become. No one can chart that blue and lonely section of hell. There are no maps of the change. You just … come out the other side. -Stephen King, The Stand