It's not too bad once you realize what's happening. Think of it like G major:
G A B C D E F#
Gonna tab it for one octave:
G-
D-2-4-5
A-2-3-5
E-3-5
To make it G♭, just reduce everything by a half-step. That means anything that is natural becomes ♭, and anything that is sharp becomes natural.
G♭ A♭ B♭ C♭ D♭ E♭ F
On the fretboard, this is even easier: you do the same patten as G major, but one fret lower:
G-
D-1-3-4
A-1-2-4
E-2-4
How about G# major? This key doesn't even exist on the circle of fifths! Start by thinking of it in the "natural" form, as plain old G major. If you're raising it a half step, anything that is flat becomes natural, anything that is natural becomes sharp, and anything that is sharp becomes double sharp ("x").
G major: G A B C D E F#
G# major: G# A# B# C# D# E# Fx
Tab:
G-
D-3-5-6
A-3-4-6
E-4-6
You can do this with any key. Here is A major, A♭ major, and A# major:
A: A B C# D E F# G#
A♭: A♭ B♭ C D♭ E♭ F G
A#: A# B# Cx D# E# Fx Gx
And the fretboard pattern is even the same:
A major
G-
D-4-6-7
A-4-5-7
E-5-7
A♭ major
G-
D-3-5-6
A-3-4-6
E-4-6
A# major
G-
D-5-7-8
A-5-6-8
E-6-8
They're all major scales. It's the exact same pattern for every one of them. Learn the notes on the E string, plant your middle finger on the tonic note, then regurgitate that pattern. It is so easy to play in every key on guitars.
And if you need a memory aide to help with the notes in each key, try learning just the "white note" keys (A, B, C, D, E, F, G), then shift them up for their sharp versions (A#, B#, C#, D#, E#, F#, G#) and down for their flat versions (A♭, B♭, C♭, D♭, E♭, F♭, G♭).