Sunday, 12 September 2021

How to Configure GitHub repository with Eclipse Project

First time? I also spent most part of the day today trying to get my Spring Boot project in Eclipse connected to GitHub and I finally got it to work, so I thought I’d share my observations to make it easier for other new learners.


When we work on any project. We want to have it stored online on Github so that it is available to be taken into other places. To make your Local Eclipse project configured with Github, follow the below steps to Configure it.

Step 1: Click on New Button to create a New Repository


Step 2: Enter any Repository name and Click on the "Create repository" button.


Step 3: Copy the URL for the repository, say gitURL.



Step 4: Open Eclipse. Click on the Search icon on the right side and Type Git Repo. You will get the below option. Choose "Git Repositories" under the View section.



Step 5: Paste the gitURL here and Click on "Next".




Step 6: Your repository will start reflecting.



Step 7: Now Create a new Spring Boot(or any other) project.



Step 8: Give the name and other required information for the project.



Step 9: Right Click on Project. Then Select Team -> Share project.



Step 10: Select the Repository that you have created from the dropdown.





Step 11: Click on Finish.


Step 12: Go to Git Staging section. Add all the uncommitted files. Give the proper Commit message and then Click on Commit and Push.



Step 13: Click on Preview. The Github login box will appear.



Step 14: Given username and Token as password.



Step 15: Click on the Push-button.



Step 16: Now push is done. Go to the Github repository and the committed files will reflect there.




No comments:

Post a Comment