I understand that the topic probably should have been called somehow differently, but the point is this. There is a bare repository on the server, from where several repository developers are cloned into their local machines. The server also has a client (not bare) repository. When one of the developers makes a commit and a push, the corresponding hook that is attached to the bare repository (post-push hook), pushes the repository to the local server. This is done so that the developers immediately see on the server what and how they changed and who else changed visually in the near future, i.e. right on the site. Everything is convenient, but there is one problem.
Today, we’ll set Developer A to work on folder X, and Developer B on U. B doesn’t intend to enter folder X and change anything there, neither does developer A to change anything in folder U. However, not even despite the fact that they work in completely different directories and on different files, if you don’t do pull before each push, then a conflict arises. Which is obvious, because it’s not the folder that he changed, but the entire repository.
I would like to find such a solution, which would either push only one directory to the server, or with the help of several branches and merge them to achieve the desired result on the server. But weakly imagine how to properly implement one or the other. I will be glad to any help.
And if someone has any other ideas, it will be great too.