Reputation: 1830
I am working with Git/SourceTree/Eclipse. I am cloning a GIT repo outside of my Eclipse workspace. SourceTree is now pointing to this location.
There is no .project file in GIT. So in Eclipse I create a new dynamic web project and import my GIT repo (including the .git folder) into it. The project builds just fine.
Now this means that any changes I make in Eclipse won't be reflected in SourceTree because the GIT repo is essentially in 2 places. So I'd have to make another repo in SourceTree just to point to my Eclipse workspace.
I cloned the GIT repo outside my workspace because I heard that's best practice. But surely there's got to be a simpler way.
What is that simpler way?
Thanks for any helpful tips.
Upvotes: 1
Views: 782
Reputation: 188
Since you imported the folder with the .git
-folder into your workspace
-folder, you could just use that directory for your development now. You no longer need the original clone.
However, I'm guessing cloning inside the workspace
-directory is considered bad practice because it can slow down your Eclipse-project (see Is it better to keep Git repository inside or outside of Eclipse workspace?).
Probably cloning with EGit could make your life easier because it can point to a .git
-folder outside your workspace
-folder. (http://wiki.eclipse.org/EGit/User_Guide#Cloning_Remote_Repositories)
Upvotes: 1