Last updated
Hi everyone!
I know this is maybe a stupid question, but I am a newbie in Git.
Let's suppose I am working on a project in the master branch and I am editing just one file, “file1.phpâ€.
Now my main manager tells me to develop a new feature and I create a new branch “new_featureâ€. In the “new_feature†branch, the changes I made to “file1.php†are still visible, and when I edit other files and make a commit in “new_featureâ€, the previous changes in “file1.php†are included in the new commit. But I do not want this, I want the changes of “file1.php†to be included in the master branch.
When I have some file modifications, how can I create a new branch from a clean working copy? So the previous modifications are not included in the new branch.
Thank you very much!