Watch folder, when direct changes are made push to repo
First, I'd highly recommend not doing this - a better approach would be to have a single source of truth (that is your repo). Force developers to commit &amp; push changes and let the pipeline do the rest. If it's not in repo, it didn't happen.
If you absolutely have to, then I'd go with &quot;brute-force&quot; way - have a pipeline that triggers periodically (every couple of hours or so) and does a diff of server files against repo files. If something changed, send a threat email to the developer who did this sync back to repo.