If I want to refactor the legacy code then I need write tests for the code.So I make a new branch called 'refactor'.I will make a tests folder and some tests file in it.
But I found that when I finish the refactoring and want to merge to the master branch I need to merge tests folder and its files to master branch.
I do not want to merge these tests files to my master branch.
I want to keep the tests file and some other dev folders for the 'refactor' branch.Because maybe I need to fix some bug under this 'refactor' branch with those files.
How should I do?