I have some commits of a branch and want create to another branch but for only certain files.
Let's
git checkout mybranch
switching from master to mybranch and there already exist some commits which apply changes to different files.
Now I want to create a branch where I see similar commits but this time only with changes for files I selected. How could I do that?
My idea would be taking every commit and create a second commit for each one, where the selected files changes appear. But that can lead to a lot of manual work depending how many commits you have. Also I doubt those can be easily merged later on.
What is the best way to merge only changes of selected files? Is it even possible?