Questions about gradle and git duplicates in IntelliJ

Answered

Hello,

I started using IntelliJ when I started learning Java (more or less 2 months) and I have some weird behaviours but I don't know how to explain that so I don't know what to look for on google.

Maybe a few screenshots will help :

1) Gradle "duplicates"

gradle_duplicates.png
The top part is part of the project (scenario_manager) and the bottom part is outside of the project but I don't understand what's the difference. It seems that they are two different things like physical files on the disk and files as they are in memory.
I am confused about this. What should I do to only have one version (like an auto refresh maybe... something that will show only one version of the file) ?

This is a personal project where I try to use Gradle. My company also uses Gradle but we don't have that kind of duplicates in the projects so I assume it is some kind of settings but I can't find it.

2) Git duplicates with relative and absolute path

git_duplicates.png

Each time I change a file, I see the file duplicated in the version control window. Why ? I installed SonarQube this morning and I don't think I had that kind of things before that but I don't see how it could be related.
If I commit one file and push it on my local repo, the duplicate disappears.

Anybody knows what to do to fix those problems ?

Thank you !

3 comments
Comment actions Permalink

It looks like project/module roots are registered twice for some reason, once for the actual path and another time for the symlinked home location.

Does it help if you place the project into the path without symlinks, then delete .idea folder and reimport it from build.gradle file by opening the actual path, not the symlink?

0
Comment actions Permalink

Hi,

thank you for your help.

I didn't need to do anything except open the project again from the real path and not the symlink from my home and I don't have gradle or VCS duplicates anymore.

The duplicates for the version control system appeared once I refresh VCS changes (the blue circle with the two arrows).

I don't remember how I created the project but I wouldn't be surprised if I created it from my symlink, maybe that caused the problem.

Is that normal behaviour or is it a bug ?

Thanks again.

0

Please sign in to leave a comment.