Question: what is the difference between f sharp and g flat?
Answer: Because both F-sharp and G-flat have the same number of accidentals (F sharp has six sharps and G flat has six flats) there's little advantage to composers to using one key signature or the other unless they like sharps better than flats, or vice versa.