Let's say there are 2 git branches: master
and dev
. In dev
I deleted foo.txt
. After that in master
some changes are added to foo.txt
. When I merge master
to dev
foo.txt
is created although it was deleted from dev
.
So is there a way to NOT recreate deleted files on git merge
?
EDIT: matt pointed out that it will cause conflict and simply add the deleted file again. So the question is rather how to exclude the files from merge that have no counterpart in the target branch.