title: How to make Git forget a file after delete
body: <p>I have two Branches X and Y that use to contain the same file &quot;sample.txt&quot;. I want this file only in Branch Y and therefore, deleted in Branch X and did a HEAD commit.</p>
  <p>Now, whenever I merge the branch Y to X, it show conflict with &quot;sample.txt&quot; [deleted/modified]. I would like to make GIT forget that there was any file &quot;sample.txt&quot; in Branch X, so that while merging it never reads the same file from Branch Y and show a conflict.</p>