jack miao
jack miao

Reputation: 1488

is it possible intellij is not presenting properly git branches?

I cloned a project from github repo, and created a new branch:

git checkout -b my_new_branch

and now after I switched to the new branch I made some changes. But when I switch back to master I can still see in intelliJ my_new_branch changes...I thought that if I switch back to master I should not see them in intelliJ, I can swear it was like this before...does someone know maybe whats happening?

thanks

Upvotes: 0

Views: 69

Answers (2)

Dmitrii Smirnov
Dmitrii Smirnov

Reputation: 7528

Local changes (that are not committed yet) do not belong to any branch. So if you switch the branch without committing it is expected that Local changes stay, unless you explicitly tell git to discard them.

You get the same on the command line, it is not IntelliJ-specific

Upvotes: 1

jack miao
jack miao

Reputation: 1488

found out that i need to commit the changes so intellij will show me the difference.

Upvotes: 0

Related Questions