Depends on what you mean by 'protected'... If you can do what you suggest is isn't 'protected' at all!
However, if you set things up to be able to do as you suggest, you have virtually no protections in place, except MAYBE local execution of the files in your repository.
-Ben