I am trying to set automatic deployment for my project. The idea is to login with ssh and pulls in project dir in particular branch. But I want to exclude som directories from git pull. Because in some directory there are some daemon processes are running, which is highly sensitive.
I have already tried https://stackoverflow.com/a/4048993/2178763 and git sparse, but the first answer is not working, it is not checking out latest code after fetch -> checkout HEAD /path/
and for git-sparse, it is just removing all directories which are not available in the sparse-checkout file.
I am really stuck in here, Please help out here. I am sure this is duplicated question, but nothing is working for me.