We have two Vendors working of the same piece of code. Due to logistics issue both maintain their own instances of git.
We sync the code periodically using the following approach:
However, when a file is removed from vendor1 it should be removed for vendor2 as well. But somehow our process is failing to remove the files from vendor2.
A commit recording a file deletion should delete said file when the branch is pulled and merged in vendor2.
But when a vendor2 contributor update his/her own working tree locally, he/she might still have a copy of that file in the editor, and could save, add and commit again said file.
It is important to clean one own's working tree in order to remove any local file which might be obsolete.
git clean -f -d -x $(git rev-parse --show-cdup)