I’ve created a branch from master in order to address a file migration from es5 syntax to es6.
In that branch, I change the migrated file’s location as well as its unit test file and I do some other modifications.
I've tried those commands:
git checkout master
git remote update
git pull
git checkout -b <branch-name>
git mv path/to/file.js new/path/to/file.js
git mv path/to/file.spec.js new/path/to/file.spec.js
Then I commit my changes and only after that first commit, I start modifying the files.
The problem I encounter is that on my pull request the unit test file is recognized as a file that has been modified on the other hand the file itself, « file.js » is recognized as a file that has been deleted and recreated.
It is a problem because I will loose the history of that file.