Bug in project view when changing VCS branches (GIT)?

Can recreate as follows:

  1. Open pyCharm - shows last open project in local branch DEV
  2. Project view shows correct file listing
  3. Change to local branch MASTER
  4. Branch changes, and folder on drive is updated, but project view is missing all files except for a handful in the root of the project folder.
  5. The change log shows the files in its view
  6. and here they are in Windows
  7. attempting to edit one result in this
  8. If I close and reopen pyCharm, leaving it in the newly checked out project, the project view refreshes and shows the directories as expected.
  9. Here it is after reload, still in the MASTER branch
  10. I tried CTRL-T and looked for other ways to refresh, and also looked at the Jetbrains Youtube videos on VCS and in the online help and it looks like what I'm doing is supposed to work, but just doesn't.

I am evaluating pyCharm for purchase and am new to both pyCharm and GIT, but  not to VCS or programming and IDE's in general.  

What am I missing?

Thanks,

 

Brady

0
4 comments

It appears that branch switching changes the project configuration in some unexpected way so it needs reloading. Check what is the difference between the .iml and .idea/modules.xml files between branches.

0

I was able to fix it, but I'm not sure which fix was key.  One of the subfolders had a .git folder from a previous tracking attempt that may have caused confusion.  I wound up starting the project over and re-uploading to GIT then creating the new branch again and it started working.  On the new attempt, I completely excluded the .idea folder from GIT instead of doing it selectively.  If that was it, it seems like files in .idea that break GIT should be auto-excluded by default.

0

There are no files in .idea that break git. In fact, it is recommended to track in git most of the config files. See https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems

The issue was most likely that the version stored in git in one branch was incorrect. Or, maybe some files were tracked in one branch and not tracked in another, which resulted in some conflict.

0

Ok, I'll read that post.  Thanks for the info.

0

Please sign in to leave a comment.