I'm working on a script that will copy from a cloned git repository to an external folder.
I can get the files changed with
git diff --diff-filter=M --name-only /git/folder /e/folder
/git/folder has 1 file in it, a config file.
/e/folder has the config file and others (binaries etc).
What I want to know if if I can get if the /e/folder has something in it only. If /git/folder has modifications then that's allowed as I'll copy that file over to top. But I want to detected that a modification has been made to e/folder which is the dest, and stop the process so the user can sort it out. I can't easily use the repository for holding the config and the binaries.
I'm trying to source control configuration files on servers to be able to track changes etc to them, and later automate their deployment.