DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Adding a Selenium-Maven Project From Eclipse to GitHub Repository
  • Developer Git Commit Hygiene
  • A Comprehensive Guide to GitHub
  • Mastering Git

Trending

  • Using Java Stream Gatherers To Improve Stateful Operations
  • Chat With Your Knowledge Base: A Hands-On Java and LangChain4j Guide
  • Build a Simple REST API Using Python Flask and SQLite (With Tests)
  • Efficient API Communication With Spring WebClient
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Import Projects From Git Into Eclipse

Import Projects From Git Into Eclipse

In this article, see how to import projects from git into Eclipse.

By 
Erich Styger user avatar
Erich Styger
·
Updated Oct. 27, 23 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
44.5K Views

Join the DZone community and get the full member experience.

Join For Free

How to Import Projects From Git Into Eclipse?

  1. Click File> Import
  2.  In the Import Window, click Projects from Git (with smart import) and click Next.
  3. In the Select Repository Source Window, click Existing local repository or Clone URI.
  4. Step through the wizard and click Finish for the wizard to analyze the content for the project folder to find projects for import. Then import them into the IDE. The imported project will be listed in the Project Explorer view.

Import Projects From Git Into Eclipse

As a VCS (Version Control System) I’m using git in all my projects. And not only for software or firmware projects: I’m using it for hardware design (KiCAD, FreeCAD, …) or for documentation (LaTeX, …) too.

The nice thing with the Eclipse IDE is that it supports nice git integration, making importing projects from git repositories easy.

Import Projects from git


In this article I show how I can import projects into Eclipse from a git repository. This is useful if projects are hosted locally or if projects are hosted on a git provider like GitHub or GitLab. DZone’s previously covered how to deploy Spring Boot apps using Gitlab.

Related DZone Guide: CI/CD Tools Compared Jenkins vs GitLab.

Prerequisites

I assume that the following is installed:

  • Eclipse IDE, for example the NXP MCUXpresso IDE
  • git: https://git-scm.com/
  • SSH agent: OpenSSH (or use the agent which comes with the git installation)

Eclipse Git Perspective

Eclipse has a dedicated perspective for git:

Open Perspective


Open Git Perspective


In that perspective I have a list of repositories and can see the status and commit messages:

Repositories in Eclipse git Perspective


 While the Eclipse git perspective is great, I still prefer to have an external git client, and my preference is SourceTree.

Clone Git Repository

For Eclipse I need to have the git repository cloned/present on my machine. I can use normal git operations tools to clone the repository, or I can do this directly from Eclipse using the menu File > Import > Git: (both importers do the same)

File Import Projects from Git


It asks you if the import shall be from an already existing repository or if a repository shall be cloned first:

Select Repository Source


For an existing local repository I can select it from the list. If the desired local repository is not listed, it can be added using the ‘Add…’ button.

Select Git Repository


If the repository is not cloned yet, I can do this using the ‘Clone URI’ option and then provide the location of the git repository:

Source Git Repository


Once cloned, I can select the folder to be scanned for the projects:

Source Git Repository

Cloning a repository might take some time, depending on the size of the repository.

Import From Repository

In a next step I can select the folder of the projects I’m interested in:

Select project folder


Then it scans for existing projects and I can import a list of projects:

Import selected projects from git


Press Finish. With this, I have the project in the Project Explorer listed:

Imported project


One important and good thing is: it does not copy the projects into the workspace: instead it links to the projects which makes sense for projects under version control.

Summary

Importing projects from a git repository is a nice feature in Eclipse, and I can clone the repository as part of the process. Of course, if I have the repository already cloned, can use the MCUXpresso IDE drag & drop feature to import the project too. Beside of that, the built-in git Perspective is very useful too.

Happy git-ing :)

Links

  • git: https://git-scm.com/
  • NXP MCUXpresso IDE: https://mcuxpresso.nxp.com
  • SourceTree client: https://www.sourcetreeapp.com/
Git Eclipse Repository (version control)

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Adding a Selenium-Maven Project From Eclipse to GitHub Repository
  • Developer Git Commit Hygiene
  • A Comprehensive Guide to GitHub
  • Mastering Git

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!