find-alternate-file

find-alternate-file is an interactive compiled Lisp function in `files.el'.

It is bound to C-x C-v.

(find-alternate-file FILENAME &optional WILDCARDS)

Find file FILENAME, select its buffer, kill previous buffer.
If the current buffer now contains an empty file that you just visited
(presumably by mistake), use this command to visit the file you really want.

See C-x C-f for the possible forms of the FILENAME argument.

Interactively, or if WILDCARDS is non-nil in a call from Lisp,
expand wildcards (if any) and replace the file with multiple files.

If the current buffer is an indirect buffer, or the base buffer
for one or more indirect buffers, the other buffer(s) are not
killed.