A nail gun including: a housing; a power device disposed in said housing for providing power during a drive stroke; a muzzle device coupled to said housing, and including a plate member, and a safety member that has an abutment end, and that is retractable when said abutment end is pushed by an object to be fastened; and a cartridge device coupled to said muzzle device, and adapted for supplying nails into said muzzle device for performance of the drive stroke, wherein said nail gun further includes a driving device including a linking unit that includes a linking member connected co-movably to said safety member, and a trigger unit that includes a trigger connected pivotally to said housing, an inner arm connected co-movably to said trigger, such that a pivot movement of said trigger and a rearward movement of said linking member which is driven by the retraction of said abutment end of said safety member cooperatively move said inner arm to actuate the drive stroke, and a switch member movable between a sequential striking position and a repetitive striking position, said inner arm being withdrawn from a route of the rearward movement of said linking member, thereby avoiding actuation of the drive stroke when said switch member is at the sequential striking position and when the pivot movement of said trigger is performed before the rearward movement of said linking member characterized in that said safety member cooperates with said plate member to define a nail ejection opening and said abutment end of said safety member extends beyond said nail ejection opening. a housing; a power device disposed in said housing for providing power during a drive stroke; a muzzle device coupled to said housing, and including a plate member, and a safety member that has an abutment end, and that is retractable when said abutment end is pushed by an object to be fastened; and a plate member, and a safety member that has an abutment end, and that is retractable when said abutment end is pushed by an object to be fastened; and a cartridge device coupled to said muzzle device, and adapted for supplying nails into said muzzle device for performance of the drive stroke, wherein said nail gun further includes a driving device including a linking unit that includes a linking member connected co-movably to said safety member, and a trigger unit that includes a trigger connected pivotally to said housing, an inner arm connected co-movably to said trigger, such that a pivot movement of said trigger and a rearward movement of said linking member which is driven by the retraction of said abutment end of said safety member cooperatively move said inner arm to actuate the drive stroke, and a switch member movable between a sequential striking position and a repetitive striking position, said inner arm being withdrawn from a route of the rearward movement of said linking member, thereby avoiding actuation of the drive stroke when said switch member is at the sequential striking position and when the pivot movement of said trigger is performed before the rearward movement of said linking member a linking unit that includes a linking member connected co-movably to said safety member, and a trigger unit that includes a trigger connected pivotally to said housing, an inner arm connected co-movably to said trigger, such that a pivot movement of said trigger and a rearward movement of said linking member which is driven by the retraction of said abutment end of said safety member cooperatively move said inner arm to actuate the drive stroke, and a switch member movable between a sequential striking position and a repetitive striking position, said inner arm being withdrawn from a route of the rearward movement of said linking member, thereby avoiding actuation of the drive stroke when said switch member is at the sequential striking position and when the pivot movement of said trigger is performed before the rearward movement of said linking member a trigger connected pivotally to said housing, an inner arm connected co-movably to said trigger, such that a pivot movement of said trigger and a rearward movement of said linking member which is driven by the retraction of said abutment end of said safety member cooperatively move said inner arm to actuate the drive stroke, and a switch member movable between a sequential striking position and a repetitive striking position, said inner arm being withdrawn from a route of the rearward movement of said linking member, thereby avoiding actuation of the drive stroke when said switch member is at the sequential striking position and when the pivot movement of said trigger is performed before the rearward movement of said linking member characterized in that said safety member cooperates with said plate member to define a nail ejection opening and said abutment end of said safety member extends beyond said nail ejection opening.