How can I prevent deleting deleted files when I merge a branch on Git
I have a "develop_refactor" branch based on a "develop" branch. In "develop_refactor" I deleted some file in "develop_refactor". Sometimes I merge from "develop" to "develop_refactor" to update the newest code from "develop". But the deleted file comes back. I have to delete again. How can I prevent it from being returned?
Update
+3
source to share
2 answers
The deleted file will appear when there is a conflict with a file on the server. You delete it, but some modify it on the server. So git detects this as a conflict. And it is restored again for you. If you don't want this file, just delete it.
Unless the remote file is modified by another person, it won't reappear when you merged with the developer into a child branch.
0
source to share