〜が (but)
but, and (softening)
Sentence + が, sentence
Sign up free to review this point on a spaced schedule.
After a whole clause, が means "but": 日本語は難しいですが、面白いです, "Japanese is hard, but it's interesting".
This isn't the subject が. You can tell them apart by what comes before: the subject が follows a noun (猫が), the "but" が follows a complete clause, usually ending in です or ます.
It also softens an opening, with no real contrast at all: すみませんが、駅はどこですか, "excuse me, (but) where's the station?"; 失礼ですが…, "pardon me, but…".
In polite speech it's the natural "but". Among friends, けど (next point) is more common.
Register: Polite and a little formal. In casual speech, けど.
Examples
日本語は難しいですが、面白いです。
Japanese is hard, but it's interesting.
行きたいですが、時間がありません。
I'd like to go, but I don't have time.
すみませんが、駅はどこですか。
Excuse me, where's the station?
この店は高いですが、とてもおいしいです。
This place is expensive, but it's really good.
失礼ですが、お名前は?
Excuse me, may I ask your name?