linux – Keeping remote files up to date

I have a web server running remotely on Linux and I’d like to sync my local fines to the server whenever there’s a change. It needs to update when a local file is deleted or a new local file is added. A key function would be so it can have a config file we can share in the team, so another member could just run a script in the web root and keep the whole thing in sync. (config file would have to include specific folders/files it has to sync).

I have tried using Prepros with its file upload feature – it can’t delete remote files and there’s no filters.
I’ve been using WinSCP for now, but for example if I want to sync just two out of 5 directories, I have to run two instances of it.

Any recommendations?