The comma is such a little mark, but it can prompt big confusion—and heated debate—about its use.
There’s a lot to cover, so let’s jump right in. (Believe me, we will not cover everything about commas here, but we’ll give it a shot.)
A compound sentence comprises two independent clauses. Each clause has a subject and verb and could stand as a sentence unto itself. It takes a comma before the conjunction (and, but, or, etc.):
The dog barked at a cat, and the cat ran up a tree.
My uncle is sick, but the highway is green.
I can bring you along while I shop for shoes, or you can stay home and watch sports all day. (Decisions, decisions …)
In the following case, the dog is the subject of both verbs, so there should be no comma:
The dog barked at a cat but didn’t chase it. (You would use a comma if it were structured this way: The dog barked at a cat, but he didn’t chase it.)
Here we have modifying phrases for the cat.
(Here, the modifying phrase specifies a particular cat. There may have been other cats, but the pooch barked at the one up the tree. No comma.)
Often we see commas misplaced in sentences with a complex predicate and a modifying phrase: