How can I fix a renamed file if I forgot to run `git mv`?

353 views Asked by At

I reset my branch to an earlier commit, keeping changes, using a graphical git app.

However what was previously a moved file (git mv Anchor.jsx Anchor.tsx) has become an add and a delete:

$ git status
git status
On branch more-pre-project-creation-fixes
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
  deleted:    components/atoms/Anchor.jsx
  new file:   components/atoms/Anchor.tsx

How can I fix this using the git command line?

0

There are 0 answers