Different systems have chosen to take very different stances on this. As it turns out, taking a stance on what makes a file a file (or a ship a ship) — being explicit rather than vague — does not solve the problem. Not even close. In fact, one of the many little things that make Git a brilliant piece of software is that it refuses to take a stance on identity. Git is intentionally vague about what makes a file a file. It doesn't actually track it at all — file identity is determined retroactively. It's a question for which Git intentionally doesn't have a straight answer.
What I think is really fascinating about all of this is that computers are forcing us to deal with age-old philosophical problems head on. These are not just interesting riddles anymore. They're real problems that need concrete solutions. Event more interestingly, there is something in this that establishes computing as categorically different from just pure mathematics. Computing forces us to bridge abstraction with the real world — to answer questions like what is the relationship between an abstract model and the thing that is being modelled. This to me is really exciting, and what follows from it can't be easily dismissed with a comment like "most philosophical problems only exist because language is vague".