To demonstrate how the major scale pattern works starting on any note, here is the G major scale. Notice that the 7th degree is F sharp (F#) instead of F. This is done to maintain the correct pattern of tones and semitones and thus retain the sound of the major scale (do re mi fa so la ti do).
This example shows two octaves of the G Major scale.