I have two branches, master
and feature
.
feature
branch is derived from master
branch and has 3 more commits. It has uncommitted changes as well.
At this point, I was going to update the master with these uncommitted changes.
So I did git checkout master
but it throws me an error Your local changes to the following files would be overwritten by checkout
.
What I can't understand is that sometimes I was able to switch the branch with uncommitted changes, and sometimes I wasn't.
- Could you anyone let me know when I can and can't switch the tab with uncommitted changes ?
- And in my above situation, how can I update the master branch for only those uncommitted changes?