Instead of leaving lots of ends and adding new yarn every time you switch colors, carry the yarn up the edge instead! This technique works wonderfully for two or four row stripes (but leaves a loop for anything larger).
Carrying yarn up the edge happens when you're ready to switch back to a color from two or four rows ago that is still attached to your work. When you're working back and forth in rows, you can only carry yarn up the edge after an even number of rows (so you're back to where the tail is).
This technique often seems too simple to comprehend. You're really not doing anything but grabbing the yarn in the color you want to switch back to and starting to knit with it!
For consistency, make sure the same color is in front every time you carry yarn up the edge.
If you haven't already, familiarize yourself with the different styles of knitting before continuing. There are three different ways to hold your yarn when knitting and you want to make sure you're watching the right technique for you.