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...
https://www.czetsuyatech.com/2020/05/git-commit-on-github-using-eclipse.html
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
- Download and install Eclipse from https://www.eclipse.org/downloads/.
- Install the EGit plugin. In Eclipse, select Help / Eclipse Marketplace / Search for EGit.
Stage 2 - Local Project Creation
- Create a new maven project in eclipse using maven-archetype-quickstart.
- Right-click on the project and select Team / Share / Project.
- Open both the Git Staging and Repositories tab. In Eclipse Window / Show View / Others and filter git.
- In the Git Staging tab, drag the files from Unstaged Changes to Staged Changes list.
- Add a Commit Message. Note that we will not push our repository yet as we don't have one in the remote.
- Now, our project has been save into the local Git repository.
Stage 3 - Creation of GitHub account and Repository
- In your URL open Github.com.
- Create an account using your email.
- 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.
- Create a Github project.
Stage 4 - Push the Local Project to the Remote Git Repository
- Going back to Eclipse IDE.
- 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.
- In the Git Repositories tab, right-click on your local git repository and select Push Master.
- The form should automatically be filled up.
- Select Push and Finish.
- Go back to your browser and refresh the git project that you just created. You should be able to see your commit.
Post a Comment