git merge: Removing files I want to keep!
问题 How can you merge two branches in git, retaining necessary files from a branch? When merging two branches, if a file was deleted in one branch and not in another, the file is ultimately deleted. For example: A file exists in master when you make a new branch you remove the file from master since we don't need it (yet) you make changes in the branch to add a feature, which relies on the file existing you make bug fixes in master (cannot be discarded) you merge some day, and the file is gone!