An octave is the interval between two notes with the same letter name, but one is an octave higher or lower than the other. The interval from G to A is a major seventh, which is one semitone short of an octave. If you flatten the A by one semitone, it becomes A♭, and the interval from G to A♭ is a minor octave.