Routes into sustainable industries
Analytic skills are very valuable in many sustainability industries, as are knowledge of engineering and physics principles.
There have traditionally been two routes into what we now call the low-carbon industries: one route has been via NGOs and lots of volunteering. The other has been engineers and scientists who care about the impact of their work.
People who come through the former route have been very good at the lobbying, building social networks and grass-roots movements.
People who come through the latter route have been very good at the innovation and implementation side of things.
University research projects as a route to industry
When looking at the migration from academic study to sustainable industries, I strongly advise looking to your research projects: many undergraduate courses, and all the Masters courses I'm aware of, involve some research project. Many industry bodies are interested in co-operating with universities on these research projects.
For the companies, they sometimes get useful work out of it, they build useful links with academic research departments, and the research project itself can form an extended internship / dress-rehearsal for a job.
For the student, they get chance to see whether the company would be a good fit for them, as well as doing real-world research.
Skills above knowledge
It's far more important that you develop the right skills, than look to particular areas of knowledge. A bright student with the right skills will quickly pick up the appropriate knowledge when they start in an industry. Whereas someone who ends their formal studies with knowledge but no significant skills in research, self-motivation or independent thought, isn't much use to any employer, beyond doing repetitive grunt work. That's valuable work, and someone's got to do it, but I don't think that's what you're looking for.
Choice of subject
So, as to Physics vs Computer Science, focus on wherever your skills are best placed: pick the one you'll excel at. And take into account any links that each department has with particular companies - ask around in the department, to find out where people get employed after leaving, and which companies people have done research with in the past.
Choice of Masters
You can also apply those criteria if you choose to do a Masters. A Masters degree can be a great way to build links with a particular company or industry, and to specialise in your skills and knowledge. Choose a university course that already has links to your target company: so, for example, if you want to work with Tesla, find out which universities they co-operate with currently, and which universities their staff went to.