Importing existing git repos into Eclipse/PyDev
Posted on Mon 22 August 2011 in software.
I’ve spent most of today trying to get either Anjuta or Eclipse/PyDev working with my django git repos for lapwing.os/website. And watching notch work on his LundumDare 48 submission.
I probably missed an easier method, but these were the steps;
- File > Import > Projects from Git
- Next, Add
- Browse, Select the directory with your git repo in, OK
- Search, OK
- Next, Import as General Project, Enter a project name if you wish
- In the Package Explorer pane, right click on the new project
- Pydev > Set as Django Project
- In the Package Explorer pane, right click on the project again
- Properties > PyDev - PYTHONPATH, in Source Folders click “Add source folder” and include the selected directory
- Properties > PyDev - Django and set where manage.py and settings.py are. You may need to copy manage.py from somewhere if isn’t part of your git repo
By default Eclipse/PyDev add .project and .pydevproject to the directory, so you may want to add them to your .gitignore file.