The use of sharps and flats means that the same note can have two different names. For example, F# = Gb and G# = Ab.
These are referred to as enharmonic notes. The following diagram outlines all of the notes in the first position on the guitar (including both names for the enharmonic notes). The first position consists of the open string notes and the notes on the first four frets.