CS3340:  Intro OOP and Design

How to clone an already existing GIT (bitbucket) repository and Import the Elcipse Project stored there.

1) clone the already existing GIT repository into Eclipse using the eGit support

 2) import the Eclipse Project from the Cloned repository of step 1

(but, ofcourse this means you really have an already existing Eclipse project in the GIT repository)

 

 

 

step 1: How to Clone an existing GIT repository

 

In Eclipse select Persepective->Git in Eclipse and Clone the already created bitbucket repository

Select "Click Clone" -- (note: you can also create a repository directly from here too)

 

Fill in the information including the URL to the git repository you made in bitbucket in the first steps

AN EXAMPLE

 

 

Here is the result of cloning on LEFT and on RIGHT you see the repository

 

 

step 2: How to import the Eclipse Project form the clones repository of step 1

 

Now you may want to import the project so you can work on the source code.

  1. Click‘Windows’->‘Open Perspective’>‘Resource’

  2. Click ‘File’>‘Import’>‘Git’>‘Projects from Git’>‘Existing local repository’>‘Select a Git Repository’ >



  3. ‘Import as General Project’> ‘Next’>‘Finish’

  4. The code should then appear in your ‘Project Explorer’ window as a normal project

  5. Now make changes to your file as you want

  6. Look at ‘Git Staging’ view to see your changed files and Click ‘Commit and Push‘

 

 

 

© Lynne Grewe