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.
2.
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.
3.
が (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.)
4.
In some structures, が (GA) can be translated as "as soon as..." The Japanese structure is "verb + が + hayai ka."