lunes, 23 de julio de 2018

02. Create a Git Hub Project and connect with Eclipse

0. Introduction


There are the steps to follow:


1. Create a Repository in Hit Hub

It's assumed you have an account in Hit Hub


Navigate to https://github.com/YourName where "YourName" is the name of the account you have in Git Hub. In my case I use https://github.com/ximodante

Add a new repo as shown in the image. Click on  "+" at the top right of the window and select New Repository.




Give a name (for instance OpeWebMavenPhGH), a description, and you can optionally create a README file. The press "Create Repository" button.


The README.md file is created with the information provides in the description field.


2. Show Git related views in Eclipse

The previous entry java project has been renamed to OpenWebMavenPhGH.

From the top menu Window > Show View > Other > Git > Git Repositories


Press Open button

Similarly Window > Show View > Other > Team > History



3. Clone a remote repository using Eclipse

In the Git Repositorues view, click to Clone a Git repository 


And fill the form as follows, using your Git Hub account


Press Next button.



Press Next button.



Press Finish button.

Now the Git Repositories view is updated to:




4. Assign our project to the repository

Right-click on the project and select Team > Share Project



Let's select the created repository and Finish




Take into account that our project has been moved from our eclipse workspace to

/home/eduard/git/OpenWebmavenPhGH/OpenWebmavenPhGH



5. Commit our work

Right-click over the repository in the Git Repository Window and select Commit





And we are addressed to Git Staging window. Let's add a Commit message as in the image  press







and pass Unstaged Changes to Staged changes window.


And press  the "Commit and Push Button"

And the changes have been committed.



6. Verify in Git Hub

In https://github.com/ximodante/OpenWebMavenPhGH we can see :


And entering the OpenWebMavenPhGH folder:

It's obvious that our work has been committed to the Git Hub.

Happy coding

No hay comentarios:

Publicar un comentario