I have two working branches: master
and features
. I did git checkout features
and worked on my features
branch. I liked the changes but didn't commit anything.
I then went back to my master branch (git checkout master
) and upon doing a git status
, all of the changes that I had in the staging area of my features
branch were also in my master
branch. This was further proven when I ran my app from the master
branch and the changes were there.
The question is how could've the branches exchanged info without a merge? The purpose of using a branch in the first place was that if I messed up, I could've simply deleted the branch, no worries. What has happened is that changes that I made on the features
branch automatically transferred to the master
branch without me manually doing so.