Here's the breakdown:
* Independent Clause: A complete sentence with a subject and verb that can stand alone.
Example:
* The sun was shining, but it was still cold outside.
Explanation:
* "The sun was shining" is an independent clause.
* "It was still cold outside" is another independent clause.
* "But" connects these two clauses, creating a compound sentence.
Here's how to know when to use a comma before "but":
1. Identify the clauses: Look for two complete sentences that could stand alone.
2. Check for a connecting word: If "but" is connecting these clauses, you'll usually need a comma before it.
However, there are some exceptions:
* Short and simple clauses: You can sometimes omit the comma if the clauses are very short and simple: "I tried but failed."
* Emphasis: You might choose to omit the comma for stylistic reasons to emphasize the connection between the clauses: "He said he would come, but he didn't."
In general, using a comma before "but" when it connects independent clauses is the safest and most common practice.