Your SlideShare is downloading. ×
0
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Using Git Inside Eclipse, Pushing/Cloning from GitHub

730

Published on

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

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

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
730
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
36
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Java for Hydrologists Some useful applications of EGit R. Rigon, F. Serafin R.Rigon-IltavolodilavorodiRemoWolf March 20, 2014
  • 2. 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. 1 All the instructions are taken from Lars Vogel’s blog http://www.vogella.com/tutorials/EclipseGit/article.html and from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide. Riccardo Rigon, Francesco Serafin March 20, 2014 2 / 48
  • 3. 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. 1 All the instructions are taken from Lars Vogel’s blog http://www.vogella.com/tutorials/EclipseGit/article.html and from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide. Riccardo Rigon, Francesco Serafin March 20, 2014 2 / 48
  • 4. 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. 1 All the instructions are taken from Lars Vogel’s blog http://www.vogella.com/tutorials/EclipseGit/article.html and from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide. Riccardo Rigon, Francesco Serafin March 20, 2014 2 / 48
  • 5. 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. 1 All the instructions are taken from Lars Vogel’s blog http://www.vogella.com/tutorials/EclipseGit/article.html and from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide. Riccardo Rigon, Francesco Serafin March 20, 2014 2 / 48
  • 6. 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 visit http://www.vogella.com/tutorials/EclipseGit/article.html https://wiki.eclipse.org/EGit/User_Guide 1 All the instructions are taken from Lars Vogel’s blog http://www.vogella.com/tutorials/EclipseGit/article.html and from Eclipsepedia https://wiki.eclipse.org/EGit/User_Guide. Riccardo Rigon, Francesco Serafin March 20, 2014 2 / 48
  • 7. 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 code management system2 . 2 Git was initially designed and developed by Linus Torvalds for Linux kernel development Riccardo Rigon, Francesco Serafin March 20, 2014 3 / 48
  • 8. 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 code management system2 . Distributed revision control In computer programming, a distributed revision control system (DRCS) or distributed version control system (DVCS) keeps track of software revisions and allows many developers to work on a given project without requiring that they maintain a connection to a common network. 2 Git was initially designed and developed by Linus Torvalds for Linux kernel development Riccardo Rigon, Francesco Serafin March 20, 2014 3 / 48
  • 9. 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 code management system2 . Distributed revision control In computer programming, a distributed revision control system (DRCS) or distributed version control system (DVCS) keeps track of software revisions and allows many developers to work on a given project without requiring that they maintain a connection to a common network. Every Git working directory is a full-fledged repository with complete history and full version tracking capabilities, not dependent on network access or a central server. 2 Git was initially designed and developed by Linus Torvalds for Linux kernel development Riccardo Rigon, Francesco Serafin March 20, 2014 3 / 48
  • 10. 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 that use the Git revision control system. GitHub offers both paid plans for private repositories, and free accounts for open source projects. Riccardo Rigon, Francesco Serafin March 20, 2014 4 / 48
  • 11. 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 that use the Git revision control system. GitHub offers both paid plans for private repositories, and free accounts for open source projects. The site provides social networking functionality such as feeds, followers, wikis and the social network graph to display how developers work on their versions of a repository. Riccardo Rigon, Francesco Serafin March 20, 2014 4 / 48
  • 12. 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 version control system Git directly within the Eclipse IDE. EGit is based on the JGit library. Riccardo Rigon, Francesco Serafin March 20, 2014 5 / 48
  • 13. 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 version control system Git directly within the Eclipse IDE. EGit is based on the JGit library. JGit JGit is a library which implements the Git functionality in Java Riccardo Rigon, Francesco Serafin March 20, 2014 5 / 48
  • 14. 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 Serafin March 20, 2014 6 / 48
  • 15. 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 in their default configuration Riccardo Rigon, Francesco Serafin March 20, 2014 6 / 48
  • 16. 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 in their default configuration No additional installation is required Riccardo Rigon, Francesco Serafin March 20, 2014 6 / 48
  • 17. 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 in their default configuration No additional installation is required If the EGit plug-in is missing in your Eclipse installation, you can install it via the Eclipse Marketplace. Start this manager via the Help→Eclipse Marketplace menu entry. Riccardo Rigon, Francesco Serafin March 20, 2014 6 / 48
  • 18. 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 in their default configuration No additional installation is required If the EGit plug-in is missing in your Eclipse installation, you can install it via the Eclipse Marketplace. Start this manager via the Help→Eclipse Marketplace menu entry. Riccardo Rigon, Francesco Serafin March 20, 2014 6 / 48
  • 19. 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 Serafin March 20, 2014 7 / 48
  • 20. 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 Serafin March 20, 2014 7 / 48
  • 21. 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 (the Git default repository folder); • configure your name used in Git; • configure your email address used in Git3 ; • configure your Git default repository folder. 3 Git configuration settings can be configured using the EGit configuration preference page but this configuration is not store in the Eclipse preferences store but in git configuration files in order to ensure that native git sees the same configuration. Riccardo Rigon, Francesco Serafin March 20, 2014 8 / 48
  • 22. 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 (the Git default repository folder); • configure your name used in Git; • configure your email address used in Git3 ; • configure your Git default repository folder. 3 Git configuration settings can be configured using the EGit configuration preference page but this configuration is not store in the Eclipse preferences store but in git configuration files in order to ensure that native git sees the same configuration. Riccardo Rigon, Francesco Serafin March 20, 2014 8 / 48
  • 23. 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 (the Git default repository folder); • configure your name used in Git; • configure your email address used in Git3 ; • configure your Git default repository folder. 3 Git configuration settings can be configured using the EGit configuration preference page but this configuration is not store in the Eclipse preferences store but in git configuration files in order to ensure that native git sees the same configuration. Riccardo Rigon, Francesco Serafin March 20, 2014 8 / 48
  • 24. 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 (the Git default repository folder); • configure your name used in Git; • configure your email address used in Git3 ; • configure your Git default repository folder. 3 Git configuration settings can be configured using the EGit configuration preference page but this configuration is not store in the Eclipse preferences store but in git configuration files in order to ensure that native git sees the same configuration. Riccardo Rigon, Francesco Serafin March 20, 2014 8 / 48
  • 25. 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 (the Git default repository folder); • configure your name used in Git; • configure your email address used in Git3 ; • configure your Git default repository folder. 3 Git configuration settings can be configured using the EGit configuration preference page but this configuration is not store in the Eclipse preferences store but in git configuration files in order to ensure that native git sees the same configuration. Riccardo Rigon, Francesco Serafin March 20, 2014 8 / 48
  • 26. 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 (the Git 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 and email address for a commit. Select Window→Preferences→Team→Git→Configuration to set them up. 3 Git configuration settings can be configured using the EGit configuration preference page but this configuration is not store in the Eclipse preferences store but in git configuration files in order to ensure that native git sees the same configuration. Riccardo Rigon, Francesco Serafin March 20, 2014 8 / 48
  • 27. 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 button on the Git Configuration preference page. Riccardo Rigon, Francesco Serafin March 20, 2014 9 / 48
  • 28. 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 button on the Git Configuration preference page. Riccardo Rigon, Francesco Serafin March 20, 2014 9 / 48
  • 29. 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 Serafin March 20, 2014 10 / 48
  • 30. 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 shown below. Riccardo Rigon, Francesco Serafin March 20, 2014 11 / 48
  • 31. 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 the Window→Preferences→Team→Git and writing the correct path in Default Repository Folder entry. Riccardo Rigon, Francesco Serafin March 20, 2014 12 / 48
  • 32. 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 the Window→Preferences→Team→Git and writing the correct path in Default Repository Folder entry. Riccardo Rigon, Francesco Serafin March 20, 2014 12 / 48
  • 33. 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 of the Package Explorer, after click on New→Java Project; • In the Dialog that appeared, remove the tick in Use default location; • Click on Browse, in the Dialog that appeared enter in your Git default repository folder and create a new folder named JavaForHydrologists.example. Enter in the new folder and click OK. • Thus Eclipse automatically sets the Folder Name like Project Name. Then click Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 13 / 48
  • 34. 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 of the Package Explorer, after click on New→Java Project; • In the Dialog that appeared, remove the tick in Use default location; • Click on Browse, in the Dialog that appeared enter in your Git default repository folder and create a new folder named JavaForHydrologists.example. Enter in the new folder and click OK. • Thus Eclipse automatically sets the Folder Name like Project Name. Then click Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 13 / 48
  • 35. 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 of the Package Explorer, after click on New→Java Project; • In the Dialog that appeared, remove the tick in Use default location; • Click on Browse, in the Dialog that appeared enter in your Git default repository folder and create a new folder named JavaForHydrologists.example. Enter in the new folder and click OK. • Thus Eclipse automatically sets the Folder Name like Project Name. Then click Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 13 / 48
  • 36. 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 of the Package Explorer, after click on New→Java Project; • In the Dialog that appeared, remove the tick in Use default location; • Click on Browse, in the Dialog that appeared enter in your Git default repository folder and create a new folder named JavaForHydrologists.example. Enter in the new folder and click OK. • Thus Eclipse automatically sets the Folder Name like Project Name. Then click Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 13 / 48
  • 37. 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 of the Package Explorer, after click on New→Java Project; • In the Dialog that appeared, remove the tick in Use default location; • Click on Browse, in the Dialog that appeared enter in your Git default repository folder and create a new folder named JavaForHydrologists.example. Enter in the new folder and click OK. • Thus Eclipse automatically sets the Folder Name like Project Name. Then click Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 13 / 48
  • 38. 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 of the Package Explorer, after click on New→Java Project; • In the Dialog that appeared, remove the tick in Use default location; • Click on Browse, in the Dialog that appeared enter in your Git default repository folder and create a new folder named JavaForHydrologists.example. Enter in the new folder and click OK. • Thus Eclipse automatically sets the Folder Name like Project Name. Then click Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 13 / 48
  • 39. 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 of the Package Explorer, after click on New→Java Project; • In the Dialog that appeared, remove the tick in Use default location; • Click on Browse, in the Dialog that appeared enter in your Git default repository folder and create a new folder named JavaForHydrologists.example. Enter in the new folder and click OK. • Thus Eclipse automatically sets the Folder Name like Project Name. Then click Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 13 / 48
  • 40. 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 Serafin March 20, 2014 14 / 48
  • 41. 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 Serafin March 20, 2014 14 / 48
  • 42. 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 Serafin March 20, 2014 14 / 48
  • 43. 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 Serafin March 20, 2014 14 / 48
  • 44. 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 Serafin March 20, 2014 14 / 48
  • 45. 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 Serafin March 20, 2014 14 / 48
  • 46. 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 on Window→Show View→Other; • In the Show view Dialog, expand Git and click on Git Repositories. Then click OK; • Now you can see the Git Repositories tab in your Eclipse IDE. Riccardo Rigon, Francesco Serafin March 20, 2014 15 / 48
  • 47. 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 on Window→Show View→Other; • In the Show view Dialog, expand Git and click on Git Repositories. Then click OK; • Now you can see the Git Repositories tab in your Eclipse IDE. Riccardo Rigon, Francesco Serafin March 20, 2014 15 / 48
  • 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 on Window→Show View→Other; • In the Show view Dialog, expand Git and click on Git Repositories. Then click OK; • Now you can see the Git Repositories tab in your Eclipse IDE. Riccardo Rigon, Francesco Serafin March 20, 2014 15 / 48
  • 49. 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 on Window→Show View→Other; • In the Show view Dialog, expand Git and click on Git Repositories. Then click OK; • Now you can see the Git Repositories tab in your Eclipse IDE. Riccardo Rigon, Francesco Serafin March 20, 2014 15 / 48
  • 50. 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 the JavaForydrologists.example project and then click to Team→Share Project; • Select the repository type Git and click Next; • To configure the Git repository select Use or create repository in parent folder of project; • In the next Dialog select the project and click to Create Repository, after click Finish; Riccardo Rigon, Francesco Serafin March 20, 2014 16 / 48
  • 51. 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 the JavaForydrologists.example project and then click to Team→Share Project; • Select the repository type Git and click Next; • To configure the Git repository select Use or create repository in parent folder of project; • In the next Dialog select the project and click to Create Repository, after click Finish; Riccardo Rigon, Francesco Serafin March 20, 2014 16 / 48
  • 52. 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 the JavaForydrologists.example project and then click to Team→Share Project; • Select the repository type Git and click Next; • To configure the Git repository select Use or create repository in parent folder of project; • In the next Dialog select the project and click to Create Repository, after click Finish; Riccardo Rigon, Francesco Serafin March 20, 2014 16 / 48
  • 53. 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 the JavaForydrologists.example project and then click to Team→Share Project; • Select the repository type Git and click Next; • To configure the Git repository select Use or create repository in parent folder of project; • In the next Dialog select the project and click to Create Repository, after click Finish; Riccardo Rigon, Francesco Serafin March 20, 2014 16 / 48
  • 54. 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 the JavaForydrologists.example project and then click to Team→Share Project; • Select the repository type Git and click Next; • To configure the Git repository select Use or create repository in parent folder of project; • In the next Dialog select the project and click to Create Repository, after click Finish; Riccardo Rigon, Francesco Serafin March 20, 2014 16 / 48
  • 55. 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 project is 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 version control. Riccardo Rigon, Francesco Serafin March 20, 2014 17 / 48
  • 56. 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 click like below. Riccardo Rigon, Francesco Serafin March 20, 2014 18 / 48
  • 57. 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 click like below. Riccardo Rigon, Francesco Serafin March 20, 2014 18 / 48
  • 58. 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 click like below. Riccardo Rigon, Francesco Serafin March 20, 2014 18 / 48
  • 59. 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 Serafin March 20, 2014 19 / 48
  • 60. 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 Serafin March 20, 2014 19 / 48
  • 61. 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 Serafin March 20, 2014 20 / 48
  • 62. 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 Serafin March 20, 2014 20 / 48
  • 63. 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 Serafin March 20, 2014 21 / 48
  • 64. 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 Serafin March 20, 2014 21 / 48
  • 65. 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 about what you have to do if you want to connetc to this repository via the command line. Riccardo Rigon, Francesco Serafin March 20, 2014 22 / 48
  • 66. 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 about what you have to do if you want to connetc to this repository via the command line. Riccardo Rigon, Francesco Serafin March 20, 2014 22 / 48
  • 67. 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 about what you have to do if you want to connetc to this repository via the command line. As we are going to use EGit you can ignore this information, but don’t close the window because we need the SSH or HTTP link. Riccardo Rigon, Francesco Serafin March 20, 2014 22 / 48
  • 68. 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 local and remote repository. Thus, in Eclipse in the Git Repositories tab, expand the JavaForHydrologists.example and right click on Remote and then Create Remote. Riccardo Rigon, Francesco Serafin March 20, 2014 23 / 48
  • 69. 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 Remote name must be origin, then click OK; • To Configure Push, in the next Dialog click on Change; • From your Git Remote Repository, copy the https link and paste it in the URI space. Eclipse automatically will fill the other fileds • After you must only write your GitHub credentials and the click to Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 24 / 48
  • 70. 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 Remote name must be origin, then click OK; • To Configure Push, in the next Dialog click on Change; • From your Git Remote Repository, copy the https link and paste it in the URI space. Eclipse automatically will fill the other fileds • After you must only write your GitHub credentials and the click to Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 24 / 48
  • 71. 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 Remote name must be origin, then click OK; • To Configure Push, in the next Dialog click on Change; • From your Git Remote Repository, copy the https link and paste it in the URI space. Eclipse automatically will fill the other fileds • After you must only write your GitHub credentials and the click to Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 24 / 48
  • 72. 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 Remote name must be origin, then click OK; • To Configure Push, in the next Dialog click on Change; • From your Git Remote Repository, copy the https link and paste it in the URI space. Eclipse automatically will fill the other fileds • After you must only write your GitHub credentials and the click to Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 24 / 48
  • 73. 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 Remote name must be origin, then click OK; • To Configure Push, in the next Dialog click on Change; • From your Git Remote Repository, copy the https link and paste it in the URI space. Eclipse automatically will fill the other fileds • After you must only write your GitHub credentials and the click to Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 24 / 48
  • 74. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 75. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 76. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 77. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 78. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 79. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 80. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 81. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 82. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 83. 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. The most important operations are described below. Right click on the project in the Package Explorer at every step: • Team→Add to index to add the selected resource(s) to the index of Git • Team→Commit to open the commit dialog for committing to your Git repository Then click Commit • Team→Push branch only for the first time, beacuse you must create the first master branch • In this Dialog there is nothing to do, click Next • Insert your credentials of GitHub • In this Dialog click Finish • After push, click OK Riccardo Rigon, Francesco Serafin March 20, 2014 25 / 48
  • 84. 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 you need follow this basic sequence: • Team→Add to index • Team→Commit • Team→Push to upstream Riccardo Rigon, Francesco Serafin March 20, 2014 26 / 48
  • 85. 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 you need follow this basic sequence: • Team→Add to index • Team→Commit • Team→Push to upstream Riccardo Rigon, Francesco Serafin March 20, 2014 26 / 48
  • 86. 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 you need follow this basic sequence: • Team→Add to index • Team→Commit • Team→Push to upstream Riccardo Rigon, Francesco Serafin March 20, 2014 26 / 48
  • 87. 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 you need follow this basic sequence: • Team→Add to index • Team→Commit • Team→Push to upstream Riccardo Rigon, Francesco Serafin March 20, 2014 26 / 48
  • 88. 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 the way shown before. Riccardo Rigon, Francesco Serafin March 20, 2014 27 / 48
  • 89. 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 the way shown before. Riccardo Rigon, Francesco Serafin March 20, 2014 27 / 48
  • 90. 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 the way shown before. Riccardo Rigon, Francesco Serafin March 20, 2014 27 / 48
  • 91. 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 the way shown before. Riccardo Rigon, Francesco Serafin March 20, 2014 27 / 48
  • 92. 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 Serafin March 20, 2014 28 / 48
  • 93. 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 and Eclipse will fill all tabs automatically. After click Next Riccardo Rigon, Francesco Serafin March 20, 2014 29 / 48
  • 94. 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 and select master [branch] or the branch you want Riccardo Rigon, Francesco Serafin March 20, 2014 30 / 48
  • 95. 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 Serafin March 20, 2014 31 / 48
  • 96. 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 Serafin March 20, 2014 31 / 48
  • 97. 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, then click Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 31 / 48
  • 98. 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 Serafin March 20, 2014 32 / 48
  • 99. 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 the Eclipse IDE, otherwise return to 15. Using the Git Clone Wizard you may clone remote repositories using different transport protocols. The wizard can be started by clicking on the botton Clone a Git Repository and add the clone to this view Riccardo Rigon, Francesco Serafin March 20, 2014 33 / 48
  • 100. 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 case https://github.com/francescoS/JavaForHydrologists.firstClone) and paste 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 Serafin March 20, 2014 34 / 48
  • 101. 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 case https://github.com/francescoS/JavaForHydrologists.firstClone) and paste 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 Serafin March 20, 2014 34 / 48
  • 102. 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 Serafin March 20, 2014 35 / 48
  • 103. 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 Serafin March 20, 2014 35 / 48
  • 104. 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 the remote repository (in this case there is only one branch). If you are not sure which branches you need, simply hit Select All. You can filter the branches by their name by typing using the text control above the list. Riccardo Rigon, Francesco Serafin March 20, 2014 36 / 48
  • 105. 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 repository on the local file system and define some initial settings. . Riccardo Rigon, Francesco Serafin March 20, 2014 37 / 48
  • 106. 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 repository on the local file system and define some initial settings. . Riccardo Rigon, Francesco Serafin March 20, 2014 37 / 48
  • 107. 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 repository on the local file system and define some initial settings. Click Finish. Riccardo Rigon, Francesco Serafin March 20, 2014 37 / 48
  • 108. 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 your Package Explorer. Thus, right click on the view Package Explorer and Import. Riccardo Rigon, Francesco Serafin March 20, 2014 38 / 48
  • 109. 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 Serafin March 20, 2014 39 / 48
  • 110. 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 Serafin March 20, 2014 39 / 48
  • 111. 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 Serafin March 20, 2014 39 / 48
  • 112. 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 Serafin March 20, 2014 40 / 48
  • 113. 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 Serafin March 20, 2014 41 / 48
  • 114. 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 Serafin March 20, 2014 42 / 48
  • 115. 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 Serafin March 20, 2014 43 / 48
  • 116. 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 of the entire project. So we are going to open a new tab in our Eclipse IDE: History. • Click to Window→Show View→Other; • Search and expand Team; • Then select History and click OK. Riccardo Rigon, Francesco Serafin March 20, 2014 44 / 48
  • 117. 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 of the entire project. So we are going to open a new tab in our Eclipse IDE: History. • Click to Window→Show View→Other; • Search and expand Team; • Then select History and click OK. Riccardo Rigon, Francesco Serafin March 20, 2014 44 / 48
  • 118. 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 of the entire project. So we are going to open a new tab in our Eclipse IDE: History. • Click to Window→Show View→Other; • Search and expand Team; • Then select History and click OK. Riccardo Rigon, Francesco Serafin March 20, 2014 44 / 48
  • 119. 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 of the entire project. So we are going to open a new tab in our Eclipse IDE: History. • Click to Window→Show View→Other; • Search and expand Team; • Then select History and click OK. Riccardo Rigon, Francesco Serafin March 20, 2014 44 / 48
  • 120. 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 project on which you are going to work. Riccardo Rigon, Francesco Serafin March 20, 2014 45 / 48
  • 121. 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 project on which you are going to work. Riccardo Rigon, Francesco Serafin March 20, 2014 45 / 48
  • 122. 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 simple methods: • Read from console; • Write in console. • COMMENT ALL NEW LINES! Riccardo Rigon, Francesco Serafin March 20, 2014 46 / 48
  • 123. 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 use JAutodoc. It is an Eclipse Plugin for automatically adding Javadoc and file headers to your source code. It optionally generates initial comments from element name by using Velocity templates for Javadoc and file headers. Riccardo Rigon, Francesco Serafin March 20, 2014 47 / 48
  • 124. 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 use JAutodoc. It is an Eclipse Plugin for automatically adding Javadoc and file headers to your source code. It optionally generates initial comments from element name by using Velocity templates for Javadoc and file headers. First install it: Help→Eclipse Marketplace and search JAutodoc. Riccardo Rigon, Francesco Serafin March 20, 2014 47 / 48
  • 125. 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 Serafin March 20, 2014 48 / 48

×