Pistol-whipping
Pistol-whipping or buffaloing is the act of using a handgun as a blunt weapon, wielding it as an improvised club. Such a practice dates to the time of muzzle loaders, which were brandished in such fashion in close-quarters combat once the weapon's single projectile had been expended. Etymology 
The term "buffaloing" is documented as being used in the Wild West originally to refer to the act of being intimidated or cheated by bluffing. It would develop into a term meaning to strike someone with a handgun in the 1870s when Stuart N. Lake reported Wyatt Earp doing so. Wild Bill Hickok would also be a prominent practitioner of the technique. The new use of the term developed because the act of hitting someone with their revolver was seen as an additional insult to the character of the victim. The modern terms "pistol-whipping" and "to pistol-whip" were reported as "new words" of American speech in 1955, with cited usages dating to the 1940s. Method
The practice of using the handgun itself as a blunt-force weapon began with the appearance of muzzle loaders in the 15th century. Single-shot weapons that were tedious to reload were used to strike opponents directly in close-quarters combat after their projectile had been expended. It was entirely up to circumstance whether the user had time or chose to reverse the gun in their hand and strike a blow with its handle or merely swung the heavy weapon as a club or baton holding it normally. There are arguments as to the efficacy of either approach. Author Paul Wellman notes that clubbing an opponent with the butt of a gun held by its barrel, as seen in some Westerns, is problematic. First, the danger of an unintentional discharge could fatally wound the wielder. Second, many early revolvers of the black-powder cap and ball era, were relatively fragile around their cylinders relative to solid single-shot weapons. Third, rotating a gun so that it can be held by its barrel takes extra time, potentially crucial in a conflict. To avoid the risk of damage or potential delay, pistol-whipping may be done with the gun held in an ordinary manner, hitting the target with an overhand strike from either the barrel or the flank of the gun above the trigger. It was a fairly common way to incapacitate a man in Western frontier days (assisted by the heavy weight of the handguns of the era), known as "buffaloing", with the verb form being "to buffalo". Forensics
Pistol whipping may leave unusual lacerations on the body of the injured due to various protruding details of the pistol. When blows are struck using the butt of the weapon rather than its barrel or flank, semicircular or triangular lacerations on the skin may be produced. The magazine well at the bottom of a semi-automatic pistol and its surrounding base produce rectangular lacerations on the skin. These lacerations can vary in depth and severity, but "whipped" fractures are common. The skin underneath the "whipped" area often will not present with bruising because the skin is split and not crushed. The practice was seen as a means of avoiding fatal confrontations. Instead of opening fire, an officer could knock someone unconscious with the barrel of their revolver which they claimed lowered mortality rates. This technique would later be recognized as a form of police brutality. See also
 Gunstock war club
Bayonet charge
Buttstroke
Mordhau

References

Assault
Blunt weapons
Firearm techniques
American frontier
Western (genre) staples and terminology