Creating a repo with Eclipse workspace?

I’m developing SF Apex code in eclipse and want to use git. Another developer will clone the repo and requests I commit the eclipse workspace file so the project exists & includes the necessary files. What should I create the repo with?

I created a repo starting from the top-level workspace directory (sf-workspace in my case). However, git status lists .metadata/.mylyn/ and .metadata/.plugins/* as untracked. I could gitignore the files but am not sure if that’s the best way to do this?



A philosophical question 🙂

As a rule – I ignore all files & folders that start with . – the Unix/Linux long respected way to hide them unless you explicitly know the file / folder name you want to access.

I mean – you wouldn’t version control the .log or .lock file?

Mylyn tasks are used to focus on files you’ve recently worked with. Either they’re your own tasks and you don’t want clashes with another developer (especially that Git would attempt to solve changes in zip file – good luck)… or you’re already connected to JIRA or some other task repository and their history should be “tracked” there.

plugins directory is even worse as – among others – it contains info about recently opened files, views, perspectives (the package that ends with .resources I think) as well as projects you have imported to workspace and well – plugins that might be Eclipse version- or developer-specific.

I’d say track only what you directly control: “src” directory, maybe in branches that mimic your organisation’s development – qa – uat – production SF instances. I even tend to skip the Referenced Packages – it’s just clutter and what do I care that they say added new report type. I can’t see classes anyway.

Source : Link , Question Author : Scott , Answer Author : eyescream

Leave a Comment