Technology

How to commit eclipse code to github

With the help of simple 7 steps we will able to commit eclipse project into github.

Description :

Step1: Create a github account and sign in.

Step2: Click on start project

Then create a repository

Step3: Start eclipse

Step4:Goto perspective -> Git repository and click on 2nd option as we clone our github .

Goto open perspective

Then select git from options

After selecting the git we will get the page after that we need to select the second option i.e Clone a git repository and add the clone to this view

After clicking on that button we will able to see this screen through which we will able to link between github and eclipse

After this we need to give the URL which we can get it from github

Then we have to do next then finish.

Now we have successfully linked our eclipse with github.

Step5:

Now we can create any new project or open any existing project in eclipse environment .

Step6: After that Right click on Project-> Team ->Share ->Add to git repository(We will able to see in the drop which one we have added just now, that one we have to select)

Step7:Now Right click on Project->Team->Commit

The screen will looks like this

As I have already committed the files so it is not showing anything but when we do from the beginning it will show us all the files. That will be in the Unstaged changes, we need to drag it to staged changes, then click commit and push.

After committing the code the page looks like in github