Sync project between multiple computers

I have a Yii project on one computer and I wish to sync it (via GIT) to other computers. I am able to use git to push the project to my git account and also pull to a remote computer. The vendor folder is not syncing (as is it part of the gitignore), but how do I get the vendor folder on the remote computer? Should I create a basic project on the remote computer the same way I did on the original? I read that I could just use composer update to add the vendor folder? but it was asking me for a token. I entered my GIT token but that didn’t work.
I am fairly new to git, so any assistance would be appreciated.

J

I found the solution finally. I did composer install after copying the composer.json file from the server to the remote computer.

1 Like

Just to add to that never upload vendor be it over SSH or over git

Copy also composer.lock to have exactly the same packages versions (and use composer install when having the lock file, unless you want to update explicitly).

1 Like

Thanks for the solutions. Got it working now.