You can do this in two different methods.
1. Clone from your existing repository:
Before cloning you have to check what are files are not included in .gitignore
file. If you want to clone the <magento_root_dir>/vendor
files you can remove from .gitignore
and automatically it will be cloned to the local directory. Otherwise, if you want to exclude the <magento_root_dir>/vendor
files, add to .gitignore
and obviously you should run the composer install
command after doing this. After that, you can able to push the changes to the cloud every time when you need it.
2. Fork into the new repository:
You can create a new repository and fork from the existing repository. Then clone the files from the newly forked repository as mentioned above. Your colleague can able to push the change to the new repository and from there he/she needs to send the merge request and finally you can merge the files. So without your knowledge, nobody can able to push the files directly.