no

Learn to Create and Commit a Git Project in Eclipse on Github

I. Introduction In this article, we will learn how to create a Git project in Eclipse and commit it on Github. II. Steps Stage 1 - Eclipse I...

I. Introduction

In this article, we will learn how to create a Git project in Eclipse and commit it on Github.

II. Steps

Stage 1 - Eclipse Installation

  1. Download and install Eclipse from https://www.eclipse.org/downloads/.
  2. Install the EGit plugin. In Eclipse, select Help / Eclipse Marketplace / Search for EGit.

Stage 2 - Local Project Creation

  1. Create a new maven project in eclipse using maven-archetype-quickstart.
  2. Right-click on the project and select Team / Share / Project.
  3. Open both the Git Staging and Repositories tab. In Eclipse Window / Show View / Others and filter git.
  4. In the Git Staging tab, drag the files from Unstaged Changes to Staged Changes list.
  5. Add a Commit Message. Note that we will not push our repository yet as we don't have one in the remote.
  6. Now, our project has been save into the local Git repository.

Stage 3 - Creation of GitHub account and Repository

  1. In your URL open Github.com.
  2. Create an account using your email.
  3. Create a local ssh key and upload it to Github. Follow this tutorial on how to create your private key http://czetsuya-tech.blogspot.com/2013/03/how-to-create-ssh-key-and-set-in-eclipse.html.
  4. Create a Github project.

Stage 4 - Push the Local Project to the Remote Git Repository

  1. Going back to Eclipse IDE.
  2. Copy the Git URI of the Github project that we have created. It should be something like git@github.com:czetsuya/hello-world-eclipse.git.
  3. In the Git Repositories tab, right-click on your local git repository and select Push Master.
  4. The form should automatically be filled up.
  5. Select Push and Finish.
  6. Go back to your browser and refresh the git project that you just created. You should be able to see your commit.

Related

java-getting-started 6477360413915216769

Post a Comment Default Comments

item