There is no problem. Simply git rm old
or even git add -A
and it will realize that it is a rename. Git will see the delete plus the add with same content as a rename.
You don’t need to undo, unstage, use git mv
etc. git mv old new
is only a short hand for mv old new; git rm old; git add new
.