Refer to the following diagram:
my-branch A---B---C---D
/ \
master E---F---G
During the merge from B to G I have inadvertently added files to master which I deleted from my-branch at D using git rm. Unfortunately, I have work at C which is not yet ready to be merged with master. Can I safely git rm the files in master and still merge my-branch (where the files have already been deleted) into master later?
In other words, by merging B with G, I added files to master at commit G which I do not want. These files are git rm'd from my-branch at D, but I do not want to merge D into master because C contains changes that are not ready yet. What is the best way to proceed?