Relocating Main Panel
For the branch circuits, if the wires/cables can still properly enter the panel enclosure you can simple extend the wires with wirenuts. This IS legal and proper contrary to what some might say. 

If the cables do not even reach the panel box then you should splice them in junction boxes with the same size and configuration of cable to reach the panel.