Find the number of sharps or flats in the key signature.
Determine the number of sharps or flats in the key signature.
Check the melody, determine what pitch the piece revolves around.
Check the chords, determine the chord that the piece starts with and revolves around.
Gather the information from Step 2 - 4. If there is one sharp in the key signature and the piece revolves around G, or starts with a G major chord the piece is already in G major. If it is not in the key of G then transpose the piece.
Determine the current key signature by matching up the sharps or flats with the Circle of Fifths chart.
Change the key signature so that it has one sharp.
Determine the number of chromatic half steps the key is away from G Major.
Change each pitch by transposing them up or down the exact number of chromatic half steps away from G major.
Pick the best octave for the piece and transpose the piece up or down an octave to fit the range of the instrument.