For context: I'm part of a team that is in the beginning stages of developing a process to collaborate on code using Github. Recently, one of the individuals on the team opened up a PR for some changes made to 1 file, and when reviewing it, I saw that the Github diff logic indicated that every line of code was 'new'.
I did some digging and discovered that she had taken the file from a sub-folder, made some changes to it, and then saved a copy to the root directory, thus Git starting tracking this 'new' file.
I closed the PR, and asked her to make the changes to the file in the subfolder and then open a new PR.
I'm wondering this was the best way to address this issue, and if there is a Git command/feature in Github I could have employed to correct the issue (ie. is there a way to make Git 'apply' the changes to the correct file? Almost like a way to re-basing those new commits onto the right file?).
Any assistance/guidance would be much appreciated - please let me know if I'm not thinking about this issue in the right way!