files show up from other branch

I'm using GIT for VCS. Say I start with 'master', then create a new branch 'dev', then make some changes and commit them do 'dev'.  If I switch back to 'master', I can still see files I added in 'dev'.  Why?


I've never seen this myself, but it looks like a bug.  What RubyMine, JDK versions and OS are you using?

Regards, Oleg.


I'm using an iMac and RubyMine 5.4.  It's most likely user error.  I'm going to read up on GIT and make sure I understand how it works.  For instance:
1) if I create a new branch 'dev'
2) Switch to 'dev'
3) Add a file
4) But, not do a commit
5) Switch to 'master'
6) should the new file be visible in master?


As far as I know as long you file has not been committed it is not belong to any branch and so it stays when you scwitch from branch to branch.

Hope this helps, Oleg.


Please sign in to leave a comment.