In Eclipse Oxygen, I created a project called testproj
at c:\jwork2019\testproj\
. My workspace is at c:\jwork2019\
. The project's folder has the content of
c:\jwork2019\testproj\.settings\
c:\jwork2019\testproj\src\
c:\jwork2019\testproj\.project
I would like to create a git repo for the project, located at a separate repo directory at c:\jrepo2019\
. I successfully created the empty repo c:\jrepo2019\testproj\.git\
. I want it to track all the project's files located at the workspace at c:\jwork2019\testproj\*
.
I have successfully created the project and the empty repo via Eclipse and Egit.
The problem is when I tried to Configure Git Repository of the project by right-clicking on the project and then Team -> Share Project...
, I could select the repository created, but it changes/moves the project's folder location from my workspace at c:\jwork2019\testproj\
to c:\jrepo2019\testproj\testproj\
.
I would like the project workspace directory stays in c:\jwork2019
instead of moving the project directory to the repository folder c:\jrepo2019\...
.
I am guessing that I can do that via git command line by just git add c:\jworks2019\testproj\*
, but I don't think I have the git command line installed, I only have git on Eclipse.
I found the question Can I store the .git folder outside the files I want tracked? that has the same goal. But it does it on linux command line.
Is this achievable in eclipse? And how can I do what I wanna do? Thanks