In a git repo, I accidentally moved a file, A, to B, instead of deleting A and creating a completely new B.
How can I delete A and create a new B during a rebase?
In a git repo, I accidentally moved a file, A, to B, instead of deleting A and creating a completely new B.
How can I delete A and create a new B during a rebase?
Copyright © 2021 Jogjafile Inc.
To answer your question, there's nothing you can do in a single commit to differentiate a delete+create from a rename. If you can separate the deletion and creation into separate commits, this will prevent Git from identifying the operation as a rename.
According to Wikipedia's Git article:
"The issue" being the difficulty of tracking the history of a renamed file.