Most agencies keep the code on their own infrastructure until the final invoice clears. We do the opposite: on the first day of a project we push the initial commit to a repository the client owns, and every commit after that lands in the same place.