Integrate with git if PyCharm project is a subdirectory of the repository


I am running a small scientific project, which is contained in one git repository. Python code is only one part of the project, therefore I don't create a different repository for it. Is it possible to integrate the project in Pycharm with git, if the git repository root is different from the project root?


Yes, you just need to tell IDE where the git repository is. It basically should detect and register the root automatically (since 2018.2), but if it does not due to some specifics of the project structure, just go to Setting | Version control and add the mapping there.

Note that Local changes will display all changes in the git repository, not only the changes in your project, so use grouping by directory to distinguish the changes easier.


That works indeed. Thanks!

I believe that didn't work that well for me before.. I guess that's a new feature?


No, it has been this way for years.


Please sign in to leave a comment.