GIT - Changes in a branch gets reflected in another branch
I created a new branch called "feature" and when I make any changes in this new branch called "feature" it also gets reflected in the "master" branch.
How can I fix this issue?
This is (reasonably common) misunderstanding:
If you switch branches in git, any uncommited changes (changes you made to files in your working directory, and did not commit) will remain untouched. Thus when you switch branches, it looks like these changes are "following you" through the branches.
In reality, the changed files are simply staying put, waiting to be committed (or discarded).
You should normally not work with uncommitted files for a long time in git. Either make a commit (which you can later discard if the changes were only temporary), throw the changes away, or ignore them.