Git support through symbolic link

Answered

I have a situation which I don't know if it's possible for intellij idea to support.

I have a project implemented in a product and, to build the project, the files you edit must be inside the product's directory. Now, putting all the product in version control would be bad, so the solution used is to create a symbolic link to the src folder that is under git. Illustrating with made-up folders:

c:\product\

    \custom ---> c:\vcs\src

c:\vcs

    .git

    src

Now, when I import the project in idea, I must import the directory c:\product, so Idea can identify everything, but then Idea can't see that the folder c:\product\custom is actually under source control.

Now, the question:

Is there any way, under Idea, to setup things so that it knows that the folder c:\product\custom is actually a link to another folder that is under source control, so that I can use all vcs integration normally?

5
5 comments

IDEA is looking for .git subdirectory inside the content roots, so this would not work. Maybe you can link .git back into the project?

0

I don't think this would work, even if .git is linked.

Currently, IDEA does not work well with symlinks:

E.g. https://youtrack.jetbrains.com/issue/IDEA-139788

 

Moreover, from the git perspective symlink is just a file in the working tree. So IDE needs to resolve the path correctly and use another path for git operations.

 

0
Avatar
Permanently deleted user

This issue causes a lot of problems in my project too. A fix would be more than welcome.

0
Avatar
Permanently deleted user

Hello,

I am facing the exact same issue. Has anyone figured out a solution for this?

0

I solved it.
It's a permission issue.

Run intellij with administrator permission.

1

Please sign in to leave a comment.