Watch folder, when direct changes are made push to repo So I have an azure devops repo and pipeline that copys the repo to my server when changes are pushed. However there are times when some of our developers may make a direct edit to the production server. Is there a way for me to have the azure agent that is installed on the server watch the files for any additions/changes and if/when this happens it pushes the files to the repo?
I have tried to find a solution for this but have been unsuccessful.
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.