How can i move my projects

how can i move my projects over to Github without messing up my code for them? what is the best way and the correct way to do so?