I have a repo with this structure:
/github_folder
|_A
|_B
So there are two folders: A and B
I only work in folder A. The other people of the team works in folder B.
I start to work. I make a pull, make changes and then make a commit, and push. Everything is ok. This is made by an automatic process that generates the new files in folder A.
The problem comes when another person makes a push to the repo with changes in folder B when my automatic process is not ended and tries to do the push. It says that I have local changes that are different from the repo.
This is the normal behaviour of git.
To avoid this, I try to use .git/info/exclude with this content:
B/
But the problem still remains.
So I tried this before doing the push:
git update-index --skip-worktree <FILE>
for every file in folder B.
But the problem persists.
Also if I do this:
git check-ignore <FILE_INSIDE_B>
I get an empty response.
Doing this:
git rm --cached <FILE>
Is not a solution, because it will remove the file on the repo.
So, the big question is:
How to keep the content of the folder B in the repo when doing a push?
Thanks!