I created a new feature branch and then made some changes to it and pushed the branch. Then I have checked out master branch and tried to merge my feature branch back in the master branch. While doing so, vscode showed some merge conflicts. Then I recall I did not want to merge some of the changes in feature branch in the master branch. So I unstanged those files while merging others manually. Then I committed the merge. However when I run the (merged) app, it showed those changes too which I unstanged / removed during manual merge.
What I might be doing wrong? What is recommended way to do this (discarding some changes in feature branch while merging it in master)?
Update - some more details
This is a feature branch commit:
I did not want to merge navbar.css
and NavBar.jsx
from Screens
folder. So I unstaged them during merge.
Now this is a merge commit:
As you can see, only ProfileButton.jsx
from Screens
folder is in the merge. So navbar.css
and NavBar.jsx
are indeed not included in the merge. Still when I run the app, the contents from these files get shown.
Update 2
I have not yet pushed the changes. And those files are still listed as unstaged. So these files are still present in my workspace. Is that why I am getting this issue? If yes, how can run the app with desired merge changes before pushing?