Reputation: 34013
git checkout -b new_feature
, and am now in new_feature
.new_feature
.master
with git checkout master
.new_feature
are now in master
as well, without me merging the branches.What is going here? Any idea why I no longer can do isolated changes in a branch, without them being reflected in other branches?
Upvotes: 0
Views: 94
Reputation: 14986
When you switch branches, the uncommitted changes will be reflected in the new branch.
In order to isolate your changes in the new_feature
branch use git stash
or commit your changes before switching your branch to master
.
Upvotes: 1