The proof is either an if_match with the SHA-256 the agent expects, or the exact revision that the same session read or wrote last. Being the same team member or the same PC is not enough.
Without a proof the write is refused with BASELINE_REQUIRED, and if the file changed since the session read it, with STALE_CONTEXT. If the session's own reads show that someone else changed the file while it was open, the write is refused with CHANGED_UNDER_YOU until the agent reads it again or names the revision it is knowingly replacing. Because the comparison is always with the live file, this compare-and-swap catches changes by other agents, by anyone working by FTP and by the site itself.
Each refusal means nothing was written: the agent re-reads the file, re-applies its change to the current content and sends it again. Appending, bumping a number and touching a timestamp need no baseline, because they replace nothing the agent read. If a bad overwrite still happens, the previous content can often be put back: see Can I get back a file that an agent overwrote?.