I'm used to working immediately on the production server. But now I often come across serious projects, tasks, bitrix, and so on. I want to learn how to do as expected. Develop locally, test, upload to production via git. The manuals in the network are all in pieces and difficult to assemble a puzzle. Please describe in steps the steps of building a working environment. The beginning is this: a client appears, a website on the server. Suppose you need to drastically modify. What actions?
My vision in words: upload the site code in git, upload a copy locally to the virtual machine (apparently vagrant). All this is interconnected. Develop locally in phpstorm for example. Then kommitit through git in production. Right?
Passing question: how in this case to configure xDebug in PhpStorm for debugging on the virtual machine? When I create a project there are options, remote machine, local and so on. But virtualka is, after all, essentially "remote"? But then he tries to copy everything locally. Can you recommend some kind of video course like linda.com or a book / article.