error: Your local changes to the following files would be overwritten by merge:
@pablo_macaluso - Read the errors carefully - git is telling you exactly what is wrong!
If the language seems cryptic, google it, don't just blindly assume linux commands worked
I would suggest to put your nodebb behind nginx, and have a location block matching static content use a proxy_pass directive pointing to your static server.
Use this as reference: https://nodebb.readthedocs.io/en/latest/scaling/index.html#use-a-proxy-server-to-serve-static-assets
And adjust it to have a proxy_pass http://static.example.com; instead of searching the local filesystem (ie, replace root and try_file directives) under the static content location block.
I believe this should work