How to clone a project from github and import in eclipse
Tech-Today

How to clone a project from github and import in eclipse



This page will teach us how to clone a project from GitHub to your local repository and import in eclipse.

Prerequisites:
1.) Windows/Ubuntu with JDK6/7.
2.) eclipse (I'm using Juno) with egit, m2eclipse, m2e-egit plugin (from eclipse marketplace).

Guide:
1.) Find czetsuya in GitHub: https://github.com/czetsuya/czetsuya.

2.) Click HTTP and copy the url: https://github.com/czetsuya/czetsuya.git.

3.) Open eclipse.
a.) Click Windows->Show View->Git Repositories.
b.) Click Clone a Git repository.
c.) In your GitHub repository copy, Code->Http value for example: https://github.com/czetsuya/czetsuya.git.
d.) Back to eclipse, paste the git repo in the URI field.
e.) You can enter your username/password in Git, or click next to checkout read-only access.
f.) In the next screen, make sure that master is checked. Click next.
g.) Enter the directory where you want to store the local copy. Initial branch="master". Click "Clone submodules", and select a working set if you like.
h.) Click Finish.

4.) Now in your eclipse->Git repositories, you should be able to see the newly pulled copy of your repository from GitHub.

5.) It should have the following structure:
-git
-Branches
 -Local
  -..
 -Remote Tracking
  -..
-Tags
-References
 -..
-Remotes
 -..
-Working Directory
 -GitDemo
 -..

6.) In this example, I have a GitDemo maven project in my repository. So I'll right click on GitDemo->Import maven projects. You can add the project to your working set.

7.) Click next, finish.

8.) Now the project that you imported should appear in your eclipse's project explorer. Unfortunately it's not linked by default to the repository so we have to share it.

9.) So right click on the GitDemo project->Team->Share Project. Select Git, then next.

10.) In the next screen, the local GitDemo project should be checked. Click finish.

11.) You project should now be connected to your local Git repository.




- Committing The Source Code On Github
Slack Discussion Repositories https://github.com/terawarehouse/terawarehouse-cataloghttps://github.com/terawarehouse/terawarehouse-reactTo commit our project in Github, make sure you already created a new Github repository and then: Get the repository...

- How To Initialize A Git Repository And Linked It To A Remote Repository Provider
For example we've just created a new project and want to push it to a remote repository. Here's what we need to do. Find out what is the repository url, you can see it at github. For example: https://github.com/czetsuya/JAX-RS-REST-Security.gitOpen...

- Git: How To Have 2 Local Branch Pushing To 2 Different Remote Repositories So That You Can Merge Code
This tutorial will explain how to create 2 local branches with the same code base, each linked to different repository. The purpose is that you can share code between repositories. For example in a multi-module project, it's possible that 1 project...

- How To Install Eclipse Plugin Using Available Sites And Eclipse Marketplace
This tutorial will teach us how to install eclipse plugins such as svn, egit, etc using available sites and eclipse marketplace. Note that I've done this on windows using eclipse-jee-juno. Installing eclipse plugins using available sites: 1.) To install...

- Setting Up Eclipse, Subclipse And Visual Svn Server
If you are tired of the usual copy all, zip backup your application files then I suggest you try using SVN. But let me clarrify, SVN is not a backup management tool. Instead it's a way of properly tagging each file, fix/update wherein you can put...



Tech-Today








.