Why when I work on a branch (git branch), do my BP's not work?

I had an issue last night where I created a class in C++ and based a BP on it.

I was working on a branch (Like a branch in my source control). I had a small red “X” on my C++ class.

I made a BP based on the class and when I tried to access the detail pane on some of my components nothing came up.

Then I merged my branch to master, and reloaded the project and everything worked.

I am just curious why that happened.