The particle が (GA) is used to link two clauses logically, indicating opposition, contrast, a remark or a difference. が can be translated as "but."
Suugaku wa suki desu ga, chiri wa kirai desu.
I love mathematics, but not geography.
Kono kashu wa uta wa umai ga, ninki ga nai.
This singer sings well, but (he/she) isn’t popular.
The particle が (GA) is used after a verb to build the structure “whether or not”. It expresses the idea that one or action or another doesn't make much difference.
Seikou shiyou ga shippai shiyou ga, chousen shite mimasu.
Whether I’ll succeed or fail, I’ll try.
Anata ga kikou ga kikumai ga, watashi wa ongaku o kakemasu.
I’ll play some music whether you listen or not.
が (GA) can be found at the end of a sentence. In that case, が means "but," however the end of the thought is understated. This is a typical Japanese structure often used to express politeness. Japanese people don't like saying things in a straightforward way when the information might be negative, so they prefer understating such information.
Raigetsu yasumi ga toreru to ii n da ga...
I hope I can take a holiday next month... (but I’ll understand if I can’t).
Tetsudatte agetai no desu ga...
I’d like to help you but... (I have to leave, etc.)
In some structures, が (GA) can be translated as "as soon as..." The Japanese structure is "verb + が + hayai ka."