One of the best things about the fretboard is that it's laid out in a manner that gives you repeating patterns.
These patterns can help you learn the notes on the fretboard.
By seeing familiar patterns, you will be able to play a scale throughout the entire fretboard.
In the following graphic of the G Major Scale.
I highlighted a 6 note pattern in yellow, that repeats on the fretboard.
The pattern is frets 3 - 5 - 7 on the E and A strings.
The notes are G, A, and B on the 6th (E) string, and C, D, and E on the 5th (A) string.
As you can see, the pattern repeats on the 4th (D) and 3rd (G) strings.
And again on the 2nd (B) and 1st (E) strings.
This gives you 6 notes of the G Major Scale, leaving only one note left in the scale.
The only note left in the scale is the F# note, which is highlighted in orange.
You can finger the F# with your index finger, and slide right into the next G on the next fret.
This allows you to continuously play the next part of the pattern on that string.
As with the Major Scale, the Minor Scale has a repeating pattern.
Instead of the 3 - 5 - 7 fingering of the Major Scale,
the Minor Scale pattern in 3 - 5 - 6 frets on the 6th (E) string and the 5th (A) string.
Again the pattern is highlighted in yellow.
The notes are G, A, and Bb on the 6th (E) string, and C, D, and Eb on the 5th (A) string.
Like the Major pattern, this pattern repeats to the 4th, 3rd, 2nd, and 1st strings.
The only note left in the scale is the F note, which is highlighted in orange.
The F note can be played with the index finger, and then slide up to the G note, and continue the pattern.
Another option, not highlighted, so not to confuse, is to the side up to the F note at the end of the last pattern
with your pinky, and then play the G on the next string with your index finger.
I would suggest playing the F on the next string and sliding up. When you feel very comfortable doing that,
then try the pinky option.
As with every other scale pattern, these are moveable. Want to learn the A Major Scale pattern?
Well, you already know it. It's the same pattern, just moved up 2 frets. Start on the A note at the 5th fret on the 6th string.
Want to know the A Minor Scale pattern?
Again, you already know the pattern. It's the same pattern, just moved up 2 frets. Start on the A note at the 5th fret on the 6th string.
Know scale patterns can help you learn the fretboard, and become fluent in playing across the entire fretboard.
As with anything else, knowledge is power. Once you know how to play something all over the neck,
you can bust out of any rutts by simply trying different notes on different octaves.