using git inside eclipse, pushing/cloning from github

Post on 11-May-2015

686 Views

Category:

Education

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

It explain how to setup a local git repository and a github repository to use version control of Java development.

TRANSCRIPT

Java for HydrologistsSome useful applications of EGit

R. Rigon, F. Serafin

R.R

igon

-Il

tavo

lodi

lavo

rodi

Rem

oW

olf

March 20, 2014

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Objectives

Some useful applications of EGit1

• Introduction to EGit and installation into Eclipse;• Load local existing project into remote GitHub repository;• Clone remote project into local repository.

1All the instructions are taken from Lars Vogel’s bloghttp://www.vogella.com/tutorials/EclipseGit/article.htmland from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 2 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Objectives

Some useful applications of EGit1

• Introduction to EGit and installation into Eclipse;• Load local existing project into remote GitHub repository;• Clone remote project into local repository.

1All the instructions are taken from Lars Vogel’s bloghttp://www.vogella.com/tutorials/EclipseGit/article.htmland from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 2 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Objectives

Some useful applications of EGit1

• Introduction to EGit and installation into Eclipse;• Load local existing project into remote GitHub repository;• Clone remote project into local repository.

1All the instructions are taken from Lars Vogel’s bloghttp://www.vogella.com/tutorials/EclipseGit/article.htmland from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 2 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Objectives

Some useful applications of EGit1

• Introduction to EGit and installation into Eclipse;• Load local existing project into remote GitHub repository;• Clone remote project into local repository.

1All the instructions are taken from Lars Vogel’s bloghttp://www.vogella.com/tutorials/EclipseGit/article.htmland from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 2 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Objectives

Some useful applications of EGit1

• Introduction to EGit and installation into Eclipse;• Load local existing project into remote GitHub repository;• Clone remote project into local repository.

For the complete guide visithttp://www.vogella.com/tutorials/EclipseGit/article.htmlhttps://wiki.eclipse.org/EGit/User_Guide

1All the instructions are taken from Lars Vogel’s bloghttp://www.vogella.com/tutorials/EclipseGit/article.htmland from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 2 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Git and GitHub

What is Git?

In software development, Git is a distributed revision control and source codemanagement system2.

2Git was initially designed and developed by Linus Torvalds for Linux kernel development

Riccardo Rigon, Francesco SerafinMarch 20, 2014 3 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Git and GitHub

What is Git?

In software development, Git is a distributed revision control and source codemanagement system2.

Distributed revision controlIn computer programming, a distributed revision control system (DRCS) ordistributed version control system (DVCS) keeps track of software revisions andallows many developers to work on a given project without requiring that theymaintain a connection to a common network.

2Git was initially designed and developed by Linus Torvalds for Linux kernel development

Riccardo Rigon, Francesco SerafinMarch 20, 2014 3 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Git and GitHub

What is Git?

In software development, Git is a distributed revision control and source codemanagement system2.

Distributed revision controlIn computer programming, a distributed revision control system (DRCS) ordistributed version control system (DVCS) keeps track of software revisions andallows many developers to work on a given project without requiring that theymaintain a connection to a common network.

Every Git working directory is a full-fledged repository with complete historyand full version tracking capabilities, not dependent on network access or acentral server.

2Git was initially designed and developed by Linus Torvalds for Linux kernel development

Riccardo Rigon, Francesco SerafinMarch 20, 2014 3 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Git and GitHub

What is GitHub?

GitHub is a web-based hosting service for software development projects thatuse the Git revision control system. GitHub offers both paid plans for privaterepositories, and free accounts for open source projects.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 4 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Git and GitHub

What is GitHub?

GitHub is a web-based hosting service for software development projects thatuse the Git revision control system. GitHub offers both paid plans for privaterepositories, and free accounts for open source projects.

The site provides social networkingfunctionality such as feeds, followers,wikis and the social network graph todisplay how developers work on theirversions of a repository.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 4 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

What is EGit

What is EGit?

EGit is an Eclipse plug-in which allows you to use the distributed versioncontrol system Git directly within the Eclipse IDE.

EGit is based on the JGit library.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 5 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

What is EGit

What is EGit?

EGit is an Eclipse plug-in which allows you to use the distributed versioncontrol system Git directly within the Eclipse IDE.

EGit is based on the JGit library.

JGitJGit is a library which implements the Gitfunctionality in Java

Riccardo Rigon, Francesco SerafinMarch 20, 2014 5 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Installation of Git into Eclipse

Installation of EGit

The EGit plug-in can be installed into every Eclipse IDE installation.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 6 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Installation of Git into Eclipse

Installation of EGit

The EGit plug-in can be installed into every Eclipse IDE installation.

Most Eclipse 4.2 and Eclipse 4.3 downloads from Eclipse.org contain EGit intheir default configuration

Riccardo Rigon, Francesco SerafinMarch 20, 2014 6 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Installation of Git into Eclipse

Installation of EGit

The EGit plug-in can be installed into every Eclipse IDE installation.

Most Eclipse 4.2 and Eclipse 4.3 downloads from Eclipse.org contain EGit intheir default configuration

No additional installation is required

Riccardo Rigon, Francesco SerafinMarch 20, 2014 6 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Installation of Git into Eclipse

Installation of EGit

The EGit plug-in can be installed into every Eclipse IDE installation.

Most Eclipse 4.2 and Eclipse 4.3 downloads from Eclipse.org contain EGit intheir default configuration

No additional installation is required

If the EGit plug-in is missing in your Eclipse installation, you can install it viathe Eclipse Marketplace. Start this manager via the Help→EclipseMarketplace menu entry.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 6 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Installation of Git into Eclipse

Installation of EGit

The EGit plug-in can be installed into every Eclipse IDE installation.

Most Eclipse 4.2 and Eclipse 4.3 downloads from Eclipse.org contain EGit intheir default configuration

No additional installation is required

If the EGit plug-in is missing in your Eclipse installation, you can install it viathe Eclipse Marketplace. Start this manager via the Help→EclipseMarketplace menu entry.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 6 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Installation of Git into Eclipse

Eclipse Marketplace

The dialog to install EGit is depicted in the following screenshot.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 7 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Installation of Git into Eclipse

Eclipse Marketplace

The dialog to install EGit is depicted in the following screenshot.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 7 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Eclipse preferences

Before using EGit you should:• create a folder where store the projects you want to load on GitHub (theGit default repository folder);

• configure your name used in Git;• configure your email address used in Git3;• configure your Git default repository folder.

3Git configuration settings can be configured using the EGit configuration preference pagebut this configuration is not store in the Eclipse preferences store but in git configuration filesin order to ensure that native git sees the same configuration.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 8 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Eclipse preferences

Before using EGit you should:• create a folder where store the projects you want to load on GitHub (theGit default repository folder);

• configure your name used in Git;• configure your email address used in Git3;• configure your Git default repository folder.

3Git configuration settings can be configured using the EGit configuration preference pagebut this configuration is not store in the Eclipse preferences store but in git configuration filesin order to ensure that native git sees the same configuration.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 8 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Eclipse preferences

Before using EGit you should:• create a folder where store the projects you want to load on GitHub (theGit default repository folder);

• configure your name used in Git;• configure your email address used in Git3;• configure your Git default repository folder.

3Git configuration settings can be configured using the EGit configuration preference pagebut this configuration is not store in the Eclipse preferences store but in git configuration filesin order to ensure that native git sees the same configuration.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 8 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Eclipse preferences

Before using EGit you should:• create a folder where store the projects you want to load on GitHub (theGit default repository folder);

• configure your name used in Git;• configure your email address used in Git3;• configure your Git default repository folder.

3Git configuration settings can be configured using the EGit configuration preference pagebut this configuration is not store in the Eclipse preferences store but in git configuration filesin order to ensure that native git sees the same configuration.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 8 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Eclipse preferences

Before using EGit you should:• create a folder where store the projects you want to load on GitHub (theGit default repository folder);

• configure your name used in Git;• configure your email address used in Git3;• configure your Git default repository folder.

3Git configuration settings can be configured using the EGit configuration preference pagebut this configuration is not store in the Eclipse preferences store but in git configuration filesin order to ensure that native git sees the same configuration.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 8 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Eclipse preferences

Before using EGit you should:• create a folder where store the projects you want to load on GitHub (theGit default repository folder);

• configure your name used in Git;• configure your email address used in Git3;• configure your Git default repository folder.

The Eclipse Git functionality allows you to configure your default user andemail address for a commit. SelectWindow→Preferences→Team→Git→Configuration to set them up.

3Git configuration settings can be configured using the EGit configuration preference pagebut this configuration is not store in the Eclipse preferences store but in git configuration filesin order to ensure that native git sees the same configuration.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 8 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Set up name and email used in Git

You can add entries to your Git configuration by pressing the Add Entry buttonon the Git Configuration preference page.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 9 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Set up name and email used in Git

You can add entries to your Git configuration by pressing the Add Entry buttonon the Git Configuration preference page.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 9 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Set up name used in Git

To add your user, use the user.name as key and your real name as value.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 10 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Set up mail used in Git

Repeat the procedure for your email address, using user.email as key as shownbelow.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 11 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Set up Git default repository folder

You can also enter the default folder for storing Git repositories via theWindow→Preferences→Team→Git and writing the correct path in DefaultRepository Folder entry.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 12 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Setting up Git in Eclipse

Set up Git default repository folder

You can also enter the default folder for storing Git repositories via theWindow→Preferences→Team→Git and writing the correct path in DefaultRepository Folder entry.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 12 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

New Java Project

Create a new Java project (we will work with a simple Hello World code).

• Right click in the white space ofthe Package Explorer, after clickon New→Java Project;

• In the Dialog that appeared,remove the tick in Use defaultlocation;

• Click on Browse, in the Dialogthat appeared enter in your Gitdefault repository folder and createa new folder namedJavaForHydrologists.example.Enter in the new folder and clickOK.

• Thus Eclipse automatically setsthe Folder Name like ProjectName. Then click Finish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 13 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

New Java Project

Create a new Java project (we will work with a simple Hello World code).

• Right click in the white space ofthe Package Explorer, after clickon New→Java Project;

• In the Dialog that appeared,remove the tick in Use defaultlocation;

• Click on Browse, in the Dialogthat appeared enter in your Gitdefault repository folder and createa new folder namedJavaForHydrologists.example.Enter in the new folder and clickOK.

• Thus Eclipse automatically setsthe Folder Name like ProjectName. Then click Finish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 13 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

New Java Project

Create a new Java project (we will work with a simple Hello World code).

• Right click in the white space ofthe Package Explorer, after clickon New→Java Project;

• In the Dialog that appeared,remove the tick in Use defaultlocation;

• Click on Browse, in the Dialogthat appeared enter in your Gitdefault repository folder and createa new folder namedJavaForHydrologists.example.Enter in the new folder and clickOK.

• Thus Eclipse automatically setsthe Folder Name like ProjectName. Then click Finish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 13 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

New Java Project

Create a new Java project (we will work with a simple Hello World code).

• Right click in the white space ofthe Package Explorer, after clickon New→Java Project;

• In the Dialog that appeared,remove the tick in Use defaultlocation;

• Click on Browse, in the Dialogthat appeared enter in your Gitdefault repository folder and createa new folder namedJavaForHydrologists.example.Enter in the new folder and clickOK.

• Thus Eclipse automatically setsthe Folder Name like ProjectName. Then click Finish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 13 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

New Java Project

Create a new Java project (we will work with a simple Hello World code).

• Right click in the white space ofthe Package Explorer, after clickon New→Java Project;

• In the Dialog that appeared,remove the tick in Use defaultlocation;

• Click on Browse, in the Dialogthat appeared enter in your Gitdefault repository folder and createa new folder namedJavaForHydrologists.example.Enter in the new folder and clickOK.

• Thus Eclipse automatically setsthe Folder Name like ProjectName. Then click Finish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 13 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

New Java Project

Create a new Java project (we will work with a simple Hello World code).

• Right click in the white space ofthe Package Explorer, after clickon New→Java Project;

• In the Dialog that appeared,remove the tick in Use defaultlocation;

• Click on Browse, in the Dialogthat appeared enter in your Gitdefault repository folder and createa new folder namedJavaForHydrologists.example.Enter in the new folder and clickOK.

• Thus Eclipse automatically setsthe Folder Name like ProjectName. Then click Finish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 13 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

New Java Project

Create a new Java project (we will work with a simple Hello World code).

• Right click in the white space ofthe Package Explorer, after clickon New→Java Project;

• In the Dialog that appeared,remove the tick in Use defaultlocation;

• Click on Browse, in the Dialogthat appeared enter in your Gitdefault repository folder and createa new folder namedJavaForHydrologists.example.Enter in the new folder and clickOK.

• Thus Eclipse automatically setsthe Folder Name like ProjectName. Then click Finish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 13 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

Hello World!

Now write a simple Hello World code in the newly created project.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 14 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

Hello World!

Now write a simple Hello World code in the newly created project.

You must:• Create a new package;• Create a new class;• Write the code.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 14 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

Hello World!

Now write a simple Hello World code in the newly created project.

You must:• Create a new package;• Create a new class;• Write the code.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 14 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

Hello World!

Now write a simple Hello World code in the newly created project.

You must:• Create a new package;• Create a new class;• Write the code.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 14 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

Hello World!

Now write a simple Hello World code in the newly created project.

You must:• Create a new package;• Create a new class;• Write the code.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 14 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create the Project

Hello World!

Now write a simple Hello World code in the newly created project.

You must:• Create a new package;• Create a new class;• Write the code.

Once you have wrote the code, we are going to create a local Git Repository.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 14 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

Git Repositories view

First we need to view the Git Repositories present in our Git default repository.

• Click onWindow→Show View→Other ;

• In the Show view Dialog, expandGit and click on Git Repositories.Then click OK;

• Now you can see the GitRepositories tab in your EclipseIDE.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 15 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

Git Repositories view

First we need to view the Git Repositories present in our Git default repository.

• Click onWindow→Show View→Other ;

• In the Show view Dialog, expandGit and click on Git Repositories.Then click OK;

• Now you can see the GitRepositories tab in your EclipseIDE.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 15 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

Git Repositories view

First we need to view the Git Repositories present in our Git default repository.

• Click onWindow→Show View→Other ;

• In the Show view Dialog, expandGit and click on Git Repositories.Then click OK;

• Now you can see the GitRepositories tab in your EclipseIDE.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 15 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

Git Repositories view

First we need to view the Git Repositories present in our Git default repository.

• Click onWindow→Show View→Other ;

• In the Show view Dialog, expandGit and click on Git Repositories.Then click OK;

• Now you can see the GitRepositories tab in your EclipseIDE.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 15 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

Share the Java Project

To create a new Git local Repository, we have to share the existing project.

• Right click on theJavaForydrologists.example projectand then click to Team→ShareProject;

• Select the repository type Git andclick Next;

• To configure the Git repositoryselect Use or create repository inparent folder of project;

• In the next Dialog select theproject and click to CreateRepository, after click Finish;

Riccardo Rigon, Francesco SerafinMarch 20, 2014 16 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

Share the Java Project

To create a new Git local Repository, we have to share the existing project.

• Right click on theJavaForydrologists.example projectand then click to Team→ShareProject;

• Select the repository type Git andclick Next;

• To configure the Git repositoryselect Use or create repository inparent folder of project;

• In the next Dialog select theproject and click to CreateRepository, after click Finish;

Riccardo Rigon, Francesco SerafinMarch 20, 2014 16 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

Share the Java Project

To create a new Git local Repository, we have to share the existing project.

• Right click on theJavaForydrologists.example projectand then click to Team→ShareProject;

• Select the repository type Git andclick Next;

• To configure the Git repositoryselect Use or create repository inparent folder of project;

• In the next Dialog select theproject and click to CreateRepository, after click Finish;

Riccardo Rigon, Francesco SerafinMarch 20, 2014 16 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

Share the Java Project

To create a new Git local Repository, we have to share the existing project.

• Right click on theJavaForydrologists.example projectand then click to Team→ShareProject;

• Select the repository type Git andclick Next;

• To configure the Git repositoryselect Use or create repository inparent folder of project;

• In the next Dialog select theproject and click to CreateRepository, after click Finish;

Riccardo Rigon, Francesco SerafinMarch 20, 2014 16 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

Share the Java Project

To create a new Git local Repository, we have to share the existing project.

• Right click on theJavaForydrologists.example projectand then click to Team→ShareProject;

• Select the repository type Git andclick Next;

• To configure the Git repositoryselect Use or create repository inparent folder of project;

• In the next Dialog select theproject and click to CreateRepository, after click Finish;

Riccardo Rigon, Francesco SerafinMarch 20, 2014 16 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create local Git Repository

But the decorator text “[NO-HEAD]” behind the project shows that this projectis not tracked in a repository and the question mark decorators show that the.classpath, .project, the .settings files and the src content are not yet under versioncontrol.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 17 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

Create a remote repository on GitHub

Go to www.github.com and log in with your credentials. In your home clicklike below.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 18 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

Create a remote repository on GitHub

Go to www.github.com and log in with your credentials. In your home clicklike below.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 18 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

Create a remote repository on GitHub

Go to www.github.com and log in with your credentials. In your home clicklike below.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 18 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

Repository name: JavaFor Hydrologists.example

Riccardo Rigon, Francesco SerafinMarch 20, 2014 19 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

Repository name: JavaFor Hydrologists.example

Riccardo Rigon, Francesco SerafinMarch 20, 2014 19 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

Description of the repository: First GitHub repository to use with EGit

Riccardo Rigon, Francesco SerafinMarch 20, 2014 20 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

Description of the repository: First GitHub repository to use with EGit

Riccardo Rigon, Francesco SerafinMarch 20, 2014 20 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

Click to Create repository

Riccardo Rigon, Francesco SerafinMarch 20, 2014 21 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

Click to Create repository

Riccardo Rigon, Francesco SerafinMarch 20, 2014 21 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

After creation of your new repository, GitHub displays the information aboutwhat you have to do if you want to connetc to this repository via the commandline.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 22 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

After creation of your new repository, GitHub displays the information aboutwhat you have to do if you want to connetc to this repository via the commandline.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 22 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Create a remote repository on GitHub

After creation of your new repository, GitHub displays the information aboutwhat you have to do if you want to connetc to this repository via the commandline.

As we are going to use EGit you can ignore this information, but don’t closethe window because we need the SSH or HTTP link.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 22 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Set Remote in local repository

Create Remote

Now we have the link indispensable to establish the connection between localand remote repository. Thus, in Eclipse in the Git Repositories tab, expand theJavaForHydrologists.example and right click on Remote and then CreateRemote.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 23 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Set Remote in local repository

Create Remote

• In the open Dialog the Remotename must be origin, then clickOK;

• To Configure Push, in the nextDialog click on Change;

• From your Git Remote Repository,copy the https link and paste it inthe URI space. Eclipseautomatically will fill the otherfileds

• After you must only write yourGitHub credentials and the click toFinish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 24 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Set Remote in local repository

Create Remote

• In the open Dialog the Remotename must be origin, then clickOK;

• To Configure Push, in the nextDialog click on Change;

• From your Git Remote Repository,copy the https link and paste it inthe URI space. Eclipseautomatically will fill the otherfileds

• After you must only write yourGitHub credentials and the click toFinish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 24 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Set Remote in local repository

Create Remote

• In the open Dialog the Remotename must be origin, then clickOK;

• To Configure Push, in the nextDialog click on Change;

• From your Git Remote Repository,copy the https link and paste it inthe URI space. Eclipseautomatically will fill the otherfileds

• After you must only write yourGitHub credentials and the click toFinish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 24 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Set Remote in local repository

Create Remote

• In the open Dialog the Remotename must be origin, then clickOK;

• To Configure Push, in the nextDialog click on Change;

• From your Git Remote Repository,copy the https link and paste it inthe URI space. Eclipseautomatically will fill the otherfileds

• After you must only write yourGitHub credentials and the click toFinish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 24 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Set Remote in local repository

Create Remote

• In the open Dialog the Remotename must be origin, then clickOK;

• To Configure Push, in the nextDialog click on Change;

• From your Git Remote Repository,copy the https link and paste it inthe URI space. Eclipseautomatically will fill the otherfileds

• After you must only write yourGitHub credentials and the click toFinish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 24 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Basic operations

So we can prepare our local repository to push it to remote repository. Themost important operations are described below. Right click on the project inthe Package Explorer at every step:

• Team→Add to indexto add the selected resource(s) to the

index of Git

• Team→Committo open the commit dialog for

committing to your Git repository

Then click Commit• Team→Push branch

only for the first time, beacuse you mustcreate the first master branch

• In this Dialog there is nothing todo, click Next

• Insert your credentials of GitHub

• In this Dialog click Finish• After push, click OK

Riccardo Rigon, Francesco SerafinMarch 20, 2014 25 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Summary of the main steps

Our local repository is been now copied on remote repository.

But once you have create the first master branch, to push your modify youneed follow this basic sequence:

• Team→Add to index• Team→Commit• Team→Push to upstream

Riccardo Rigon, Francesco SerafinMarch 20, 2014 26 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Summary of the main steps

Our local repository is been now copied on remote repository.

But once you have create the first master branch, to push your modify youneed follow this basic sequence:

• Team→Add to index• Team→Commit• Team→Push to upstream

Riccardo Rigon, Francesco SerafinMarch 20, 2014 26 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Summary of the main steps

Our local repository is been now copied on remote repository.

But once you have create the first master branch, to push your modify youneed follow this basic sequence:

• Team→Add to index• Team→Commit• Team→Push to upstream

Riccardo Rigon, Francesco SerafinMarch 20, 2014 26 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Summary of the main steps

Our local repository is been now copied on remote repository.

But once you have create the first master branch, to push your modify youneed follow this basic sequence:

• Team→Add to index• Team→Commit• Team→Push to upstream

Riccardo Rigon, Francesco SerafinMarch 20, 2014 26 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Problems with basic operations

• After clicking Commit;• If you cannot Push to Upstream;• You can fix this problem in theway shown before.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 27 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Problems with basic operations

• After clicking Commit;• If you cannot Push to Upstream;• You can fix this problem in theway shown before.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 27 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Problems with basic operations

• After clicking Commit;• If you cannot Push to Upstream;• You can fix this problem in theway shown before.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 27 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Problems with basic operations

• After clicking Commit;• If you cannot Push to Upstream;• You can fix this problem in theway shown before.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 27 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Push. . .with more settings

Right click on the project that you want to push and Team→Remote→Push

Riccardo Rigon, Francesco SerafinMarch 20, 2014 28 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Push. . .with more settings

Select Custom URI and paste in the URI tab the ssh link to your repository.

The ssh form is:

git@github.com:username/project.git

In my case

git@github.com:francescoS/JavaForHydrologists.example.git

Select the ssh protocol andEclipse will fill all tabsautomatically. After click Next

Riccardo Rigon, Francesco SerafinMarch 20, 2014 29 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Push. . .with more settings

In the window Push to: origin click on drop-down menu of the Source ref andselect master [branch] or the branch you want

Riccardo Rigon, Francesco SerafinMarch 20, 2014 30 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Push. . .with more settings

Click to Add Spec on the right and Next.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 31 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Push. . .with more settings

Click to Add Spec on the right and Next.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 31 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Push. . .with more settings

Click to Add Spec on the right and Next.In the other windows you can see a small summary of the push operation, thenclick Finish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 31 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Basic operations in EGit

Push...with more settings

After Push operations, the appeared Dialog shows the Push Results.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 32 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Clone project

Introduction

If we are arrived here, I suppose you have your Git Repositories view in theEclipse IDE, otherwise return to 15.

Using the Git Clone Wizard you may clone remote repositories using differenttransport protocols. The wizard can be started by clicking on the botton Clonea Git Repository and add the clone to this view

Riccardo Rigon, Francesco SerafinMarch 20, 2014 33 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Clone project

Repository Selection

Copy the URL from GitHub page of the searched project (in this casehttps://github.com/francescoS/JavaForHydrologists.firstClone) andpaste it in the URI space of the Clone Git Repository Dialog.

The other fields (Host and Repository path) are filled automatically by Eclipse.Riccardo Rigon, Francesco SerafinMarch 20, 2014 34 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Clone project

Repository Selection

Copy the URL from GitHub page of the searched project (in this casehttps://github.com/francescoS/JavaForHydrologists.firstClone) andpaste it in the URI space of the Clone Git Repository Dialog.

The other fields (Host and Repository path) are filled automatically by Eclipse.Riccardo Rigon, Francesco SerafinMarch 20, 2014 34 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Clone project

Repository Selection

You must fill the fields User and Password with your credentials of GitHub.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 35 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Clone project

Repository Selection

You must fill the fields User and Password with your credentials of GitHub.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 35 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Clone project

Branch Selection

Click Next, in the Open Dialog choose wich branches shall be cloned from theremote repository (in this case there is only one branch).

If you are not sure which branches youneed, simply hit Select All. You canfilter the branches by their name bytyping using the text control above thelist.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 36 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Clone project

Local Destination

Click Next, in the Open Dialog select the Directory where store the repositoryon the local file system and define some initial settings. .

Riccardo Rigon, Francesco SerafinMarch 20, 2014 37 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Clone project

Local Destination

Click Next, in the Open Dialog select the Directory where store the repositoryon the local file system and define some initial settings. .

Riccardo Rigon, Francesco SerafinMarch 20, 2014 37 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Clone project

Local Destination

Click Next, in the Open Dialog select the Directory where store the repositoryon the local file system and define some initial settings. Click Finish.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 37 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Import the project in the Package Explorer

Import the project in the Package Explorer

Now, to modify the project that you cloned before, you have to import it in yourPackage Explorer. Thus, right click on the view Package Explorer and Import.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 38 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Import the project in the Package Explorer

Import the project in the Package Explorer

Select Git→Project from Git

Riccardo Rigon, Francesco SerafinMarch 20, 2014 39 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Import the project in the Package Explorer

Import the project in the Package Explorer

Select Git→Project from Git

Riccardo Rigon, Francesco SerafinMarch 20, 2014 39 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Import the project in the Package Explorer

Import the project in the Package Explorer

Select Git→Project from Git and click Next.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 39 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Import the project in the Package Explorer

Import the project in the Package Explorer

Select Existing local repository and click Next.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 40 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Import the project in the Package Explorer

Select the repository JavaForHydrologists.firstClone and click Next.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 41 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Import the project in the Package Explorer

Select Import existing projects and click Next.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 42 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Import the project in the Package Explorer

This is the last Dialog, that summarizes the projects that you are importing.Then click Finish.

Now the project is visible in the Package Explorer and you can modify it.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 43 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

How to view Git History

Git History

But first to modify a cloned repository, it’s important to examine the history ofthe entire project. So we are going to open a new tab in our Eclipse IDE:History.

• Click toWindow→Show View→Other ;

• Search and expand Team;• Then select History and click OK.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 44 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

How to view Git History

Git History

But first to modify a cloned repository, it’s important to examine the history ofthe entire project. So we are going to open a new tab in our Eclipse IDE:History.

• Click toWindow→Show View→Other ;

• Search and expand Team;• Then select History and click OK.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 44 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

How to view Git History

Git History

But first to modify a cloned repository, it’s important to examine the history ofthe entire project. So we are going to open a new tab in our Eclipse IDE:History.

• Click toWindow→Show View→Other ;

• Search and expand Team;• Then select History and click OK.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 44 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

How to view Git History

Git History

But first to modify a cloned repository, it’s important to examine the history ofthe entire project. So we are going to open a new tab in our Eclipse IDE:History.

• Click toWindow→Show View→Other ;

• Search and expand Team;• Then select History and click OK.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 44 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

How to view Git History

Git History

Now the History tab is open and you can examine all the history of the projecton which you are going to work.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 45 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

How to view Git History

Git History

Now the History tab is open and you can examine all the history of the projecton which you are going to work.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 45 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Introduction

Modify the JavaForHydrologists.firstClone project

Now you can modify the simple code that we just cloned.

Some tips:• you can use the TextIO class rather than simple System.out.println();• you can read the string from console, so you can create two simplemethods:

• Read from console;• Write in console.

• COMMENT ALL NEW LINES!

Riccardo Rigon, Francesco SerafinMarch 20, 2014 46 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Introduction

A useful tip: JAutodoc

If you want to have a good standard to comment your code, you can useJAutodoc. It is an Eclipse Plugin for automatically adding Javadoc and fileheaders to your source code. It optionally generates initial comments fromelement name by using Velocity templates for Javadoc and file headers.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 47 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Introduction

A useful tip: JAutodoc

If you want to have a good standard to comment your code, you can useJAutodoc. It is an Eclipse Plugin for automatically adding Javadoc and fileheaders to your source code. It optionally generates initial comments fromelement name by using Velocity templates for Javadoc and file headers.

First install it:Help→Eclipse Marketplace and searchJAutodoc.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 47 / 48

Introduction Push new local project on remote Clone remote repo in your local Push modifies of cloned project

Introduction

How to use JAutodoc

To use JAutodoc, right click on the code and JAutodoc→Add javadoc.

Riccardo Rigon, Francesco SerafinMarch 20, 2014 48 / 48

top related