I'm using Git as my version control software. I've initialized and made the initial commit to my local repository. Then I'm creating another branch for an UI update as following.
git checkout -b "ui-update"
The issue is, when I make a change to the ui-update
branch and switch back to my master branch (without comiting those changes), the changes that are made, are also reflected in my master branch. Also, it is not giving an error when I'm switching to my master branch. This is how I switch to my master branch.
git checkout master
However, when I make a commit to the ui-update
branch, those changes are only reflected in that branch (not in master).
Is this the default behavior of Git? Or am I doing something wrong here?