Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Correct way to set up Github repo in Pydev?

Tags:

git

pydev

What is the correct way to set up a Github located repository of a Pydev project?

I usually do:

  • create Pydev project
  • share Pydev project to local folder
  • create empty project on Github
  • Push to Github (with EGit)

The issues I encounter are:

  • Why is the project in some Git directory now, instead of my Eclipse Workspace now?
  • Why do I get double nested directory structure like: Git\Project, Git\Project\.git, Git\Project\Project\.project? Is this correct?
  • Should I check in the .project and .pydevproject file? If I don't, I get a mess when cloning on a new computer. If I do, I get complains about incorrect path configuration, when I check out to a new computer.
  • Also it remains a mystery to me how and when I manage to configure the remote being tracked, rather than specifying the destination every time again.
  • How can I correctly clone the repository to a new computer and use it as a Pydev project in Eclipse?
like image 652
Gerenuk Avatar asked May 03 '14 15:05

Gerenuk


1 Answers

I would normally start a new project by importing from Github. i.e. First create an empty repository at Github and then in Eclipse do

File -> Import -> Git -> Projects from Git

Once this is complete use the New Projects wizard to define a new PyDev Project with your repo. You will then have a clone of the github repo and be able to commit changes to github.

The Project should now have the same name as the repository on github.

EDIT: You can check in the .pydev and .pydevproject files.

In order to check out this project on a new computer you would follow these steps again - or export your eclipse environment and copy that to the new computer. For the sake of training yourself in eclipse and git it would probably be a good exercise to follow the above steps.

like image 71
niallhaslam Avatar answered Oct 24 '22 04:10

niallhaslam