SlideShare une entreprise Scribd logo
1  sur  6
Télécharger pour lire hors ligne
Develop a feature/bug fix
In this exercise you will learn how to develop a new feature using EGit. Using a new local
branch for each new change (feature or bug fix) is what we recommend.
● Create a local Feature Branch
The development of a new feature (or bug-fix) should normally only depend on the
submitted state of the project (and not depend on pending changes that might or might
not pass the code review). This is why every new feature or bug-fix should be developed
in isolation on its own branch which is usually created based on the latest state of the
master branch available on the server (this is the remote tracking branch origin/
master in your local clone).
○ Go to the History View
○ Select the latest commit which has the label ‘origin/master’ and
click Create Branch..
○ in the “New Branch” dialog
■ enter a name for the local feature branch into the “Branch Name” field
(this is just a local name that is not exposed to anybody else)
■ keep the Pull Strategy Merge
■ keep Checkout new branch selected
■ confirm the dialog by clicking on Finish
○ This creates and checks out the new branch
● Develop the feature
Simply start editing the source code and implement the feature. The example project
implements a simple calculator, you may want to add an operation (create a new class
Divide.java in package org.eclipse.example.calc.internal.operations
and add a corresponding line to method setupDefaultOperations in class
Calculator) or polish its SWT or Swing UI..
● Test your feature
Run the unit tests. To keep the tutorial setup simple there are only unit tests for the logic
but no UI tests.
● Commit your changes locally
Now you want to create a new version of the local repository in your current feature
branch containing your changes. This is called “commit”.
There are two ways to perform a commit: with the Commit Dialog or from the Staging
View. In this exercise we will use the Staging View.
● Open the Git Staging view and inspect the status
Open the staging view by selecting Window > Show View > Other… > Git Staging. This
view presents which files you have touched and which files will be in the next commit.
“Unstaged Changes” lists those changes which you have done locally but which you
have not yet added to the index. “Staged Changes” list those changes which you already
have added to the index. You can drag and drop files from one area to the other.
● The Git Staging view should list two files “Calculator.java” and “Divide.java”. Double-click
on “Calculator.java” to inspect which changes you have done.
● Drag and drop “Calculator.java” and “Divide.java” to the Staged Changes area to mark
that they should be included in the next commit.
● Do another change in the class “Divide.java”. for example fix the copyright header. Now
you have two entries for the file “Divide.java”. The next commit would only contain the
changes which you have already staged.
● Enter a commit message (explaining why the change was done is more important than
what was done since this can anyway be seen from the file diffs)
● Verify that “Author” and “Committer” contain both your full name and your correct e-mail
address in the following format:
John Doe <john.doe@example.org>
● If author and committer are not preset correctly you need to change the Git configuration
parameters user.name and/or user.email. In this case cancel the dialog and open
Preferences > Team > Git > Configuration > User Setting and correct the values for
user.name and user.email .
● The Change-Id line is created when you select the button with the Gerrit icon ( ). It
is needed for the Gerrit exercises. The button is automatically selected if you cloned a
repository from Gerrit as described in exercise 1. Select the button if you want to push
the commit to Gerrit later on. You can also add the Change-Id line later.
● If you want to push the commit to an Eclipse repository later also click the “Add signed-
off-by” button since Eclipse uses this as your confirmation that you contribute the change
under the Contribution License Agreement (CLA). This adds a footer which will be
validated against the email address registered for your Eclipse account when you push
the commit to an Eclipse repository Signed-of-by: John Doe <
john.doe@example.org>
● Click Commit. As result your changes are locally committed.
Copyright © 2014 by C. Halstrick, E. Kempin, S. Lay, S. Zivkov, M. Sohn

Contenu connexe

Tendances (8)

How to Use Toggl -Jennefer Mercado- Empress of Helping Hand
How to Use Toggl  -Jennefer Mercado- Empress of Helping HandHow to Use Toggl  -Jennefer Mercado- Empress of Helping Hand
How to Use Toggl -Jennefer Mercado- Empress of Helping Hand
 
Providing sl no in Gridview in Dot Net
Providing sl no in Gridview in Dot NetProviding sl no in Gridview in Dot Net
Providing sl no in Gridview in Dot Net
 
Eclipse e git
Eclipse e gitEclipse e git
Eclipse e git
 
Project Hosting by Google
Project Hosting by GoogleProject Hosting by Google
Project Hosting by Google
 
How to Use Toggl
How to Use TogglHow to Use Toggl
How to Use Toggl
 
How to add sql server table into dot net web page (Gridview)
How to add sql server table into dot net web page (Gridview)How to add sql server table into dot net web page (Gridview)
How to add sql server table into dot net web page (Gridview)
 
How to add sorting and pagers to grid view
How to add sorting and pagers to grid viewHow to add sorting and pagers to grid view
How to add sorting and pagers to grid view
 
ASP.NET Session 5
ASP.NET Session 5ASP.NET Session 5
ASP.NET Session 5
 

Similaire à Git Tutorial EclipseCon France 2014 - Git Exercise 02 - develop a feature

Git Branching and Merging.pptx
Git Branching and Merging.pptxGit Branching and Merging.pptx
Git Branching and Merging.pptx
tapanvyas11
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
Gerrit Wanderer
 

Similaire à Git Tutorial EclipseCon France 2014 - Git Exercise 02 - develop a feature (20)

Git Branching and Merging.pptx
Git Branching and Merging.pptxGit Branching and Merging.pptx
Git Branching and Merging.pptx
 
wdt_09.pptx
wdt_09.pptxwdt_09.pptx
wdt_09.pptx
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 7 - new changescreen
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 7 - new changescreenGit Tutorial EclipseCon France 2014 - Gerrit Exercise 7 - new changescreen
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 7 - new changescreen
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
Dreamforce 13 developer session: Git for Force.com developers
Dreamforce 13 developer session: Git for Force.com developersDreamforce 13 developer session: Git for Force.com developers
Dreamforce 13 developer session: Git for Force.com developers
 
Introduction to Git for Force.com Developers
Introduction to Git for Force.com DevelopersIntroduction to Git for Force.com Developers
Introduction to Git for Force.com Developers
 
Git Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebase
Git Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebaseGit Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebase
Git Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebase
 
E caregitpresentation
E caregitpresentationE caregitpresentation
E caregitpresentation
 
Git Tutorials Git vs GitHub.pptx
Git Tutorials Git vs GitHub.pptxGit Tutorials Git vs GitHub.pptx
Git Tutorials Git vs GitHub.pptx
 
Setting up Git.pptx
Setting up Git.pptxSetting up Git.pptx
Setting up Git.pptx
 
Chicago alm user group git demo script and notes
Chicago alm user group   git demo script and notesChicago alm user group   git demo script and notes
Chicago alm user group git demo script and notes
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
Git hub plugin setup and working with Git hub on anypoint studio
Git hub plugin setup and working with Git hub on anypoint studioGit hub plugin setup and working with Git hub on anypoint studio
Git hub plugin setup and working with Git hub on anypoint studio
 
Streamlining React Component Development and Sharing with bit.pptx
Streamlining React Component Development and Sharing with bit.pptxStreamlining React Component Development and Sharing with bit.pptx
Streamlining React Component Development and Sharing with bit.pptx
 
Github plugin setup in anypoint studio
Github plugin setup in anypoint studio Github plugin setup in anypoint studio
Github plugin setup in anypoint studio
 
Github plugin setup in anypointstudio
Github plugin setup in anypointstudioGithub plugin setup in anypointstudio
Github plugin setup in anypointstudio
 
Github plugin setup in anypoint studio
Github plugin setup in anypoint studio Github plugin setup in anypoint studio
Github plugin setup in anypoint studio
 
Github plugin setup in anypoint studio
Github plugin setup in anypoint studio Github plugin setup in anypoint studio
Github plugin setup in anypoint studio
 
GDSC Git event 2023.pptx
GDSC Git event 2023.pptxGDSC Git event 2023.pptx
GDSC Git event 2023.pptx
 
Git and git hub basics
Git and git hub basicsGit and git hub basics
Git and git hub basics
 

Plus de msohn

Code Matters - Eclipse Hackers Git Guide - EclipseCon France 2014
Code Matters - Eclipse Hackers Git Guide - EclipseCon France 2014Code Matters - Eclipse Hackers Git Guide - EclipseCon France 2014
Code Matters - Eclipse Hackers Git Guide - EclipseCon France 2014
msohn
 

Plus de msohn (20)

Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23Project Gardener - EclipseCon Europe - 2018-10-23
Project Gardener - EclipseCon Europe - 2018-10-23
 
News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26News from Git in Eclipse - EclipseCon EU - 2016-10-26
News from Git in Eclipse - EclipseCon EU - 2016-10-26
 
Git journey from mars to neon EclipseCon North America - 2016-03-08
Git journey from mars to neon   EclipseCon North America - 2016-03-08Git journey from mars to neon   EclipseCon North America - 2016-03-08
Git journey from mars to neon EclipseCon North America - 2016-03-08
 
Versioning large binary files with JGit, EGit and Gerrit
Versioning large binary files with JGit, EGit and GerritVersioning large binary files with JGit, EGit and Gerrit
Versioning large binary files with JGit, EGit and Gerrit
 
News from Git in Eclipse - EclipseCon 2015 Europe
News from Git in Eclipse - EclipseCon 2015 EuropeNews from Git in Eclipse - EclipseCon 2015 Europe
News from Git in Eclipse - EclipseCon 2015 Europe
 
Git missiontomars 2015-03-10
Git missiontomars 2015-03-10Git missiontomars 2015-03-10
Git missiontomars 2015-03-10
 
News from EGit - Talk EclipseCon Europe 2014 - Ludwigsburg
News from EGit - Talk EclipseCon Europe 2014 - LudwigsburgNews from EGit - Talk EclipseCon Europe 2014 - Ludwigsburg
News from EGit - Talk EclipseCon Europe 2014 - Ludwigsburg
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 9 - starting demo gerrit
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 9 - starting demo gerritGit Tutorial EclipseCon France 2014 - Gerrit Exercise 9 - starting demo gerrit
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 9 - starting demo gerrit
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 6 - submit a change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 6 - submit a changeGit Tutorial EclipseCon France 2014 - Gerrit Exercise 6 - submit a change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 6 - submit a change
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 3 - push change to gerrit
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 3 - push change to gerritGit Tutorial EclipseCon France 2014 - Gerrit Exercise 3 - push change to gerrit
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 3 - push change to gerrit
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest state
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest stateGit Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest state
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 2 - fetch the latest state
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 1 - configure for gerrit
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 1 - configure for gerritGit Tutorial EclipseCon France 2014 - Gerrit Exercise 1 - configure for gerrit
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 1 - configure for gerrit
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 8 - view gerrit review ...
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 8 - view gerrit review ...Git Tutorial EclipseCon France 2014 - Gerrit Exercise 8 - view gerrit review ...
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 8 - view gerrit review ...
 
Git Tutorial EclipseCon France 2014 - Git Exercise 07 - git blame
Git Tutorial EclipseCon France 2014 - Git Exercise 07 - git blameGit Tutorial EclipseCon France 2014 - Git Exercise 07 - git blame
Git Tutorial EclipseCon France 2014 - Git Exercise 07 - git blame
 
Git Tutorial EclipseCon France 2014 - Git Exercise 05 - history view
Git Tutorial EclipseCon France 2014 - Git Exercise 05 - history viewGit Tutorial EclipseCon France 2014 - Git Exercise 05 - history view
Git Tutorial EclipseCon France 2014 - Git Exercise 05 - history view
 
Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...
Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...
Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...
 
Code Matters - Eclipse Hackers Git Guide - EclipseCon France 2014
Code Matters - Eclipse Hackers Git Guide - EclipseCon France 2014Code Matters - Eclipse Hackers Git Guide - EclipseCon France 2014
Code Matters - Eclipse Hackers Git Guide - EclipseCon France 2014
 
Interactive Rebase with EGit
Interactive Rebase with EGitInteractive Rebase with EGit
Interactive Rebase with EGit
 
EGit 3.0 and beyond
EGit 3.0 and beyondEGit 3.0 and beyond
EGit 3.0 and beyond
 
Cool new stuff in JGit and EGit - Eclipse Democamp Munich 2013-06-12
Cool new stuff in JGit and EGit - Eclipse Democamp Munich 2013-06-12Cool new stuff in JGit and EGit - Eclipse Democamp Munich 2013-06-12
Cool new stuff in JGit and EGit - Eclipse Democamp Munich 2013-06-12
 

Dernier

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Dernier (20)

%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 

Git Tutorial EclipseCon France 2014 - Git Exercise 02 - develop a feature

  • 1. Develop a feature/bug fix In this exercise you will learn how to develop a new feature using EGit. Using a new local branch for each new change (feature or bug fix) is what we recommend. ● Create a local Feature Branch The development of a new feature (or bug-fix) should normally only depend on the submitted state of the project (and not depend on pending changes that might or might not pass the code review). This is why every new feature or bug-fix should be developed in isolation on its own branch which is usually created based on the latest state of the master branch available on the server (this is the remote tracking branch origin/ master in your local clone). ○ Go to the History View ○ Select the latest commit which has the label ‘origin/master’ and
  • 2. click Create Branch.. ○ in the “New Branch” dialog ■ enter a name for the local feature branch into the “Branch Name” field (this is just a local name that is not exposed to anybody else) ■ keep the Pull Strategy Merge ■ keep Checkout new branch selected
  • 3. ■ confirm the dialog by clicking on Finish ○ This creates and checks out the new branch ● Develop the feature Simply start editing the source code and implement the feature. The example project implements a simple calculator, you may want to add an operation (create a new class Divide.java in package org.eclipse.example.calc.internal.operations
  • 4. and add a corresponding line to method setupDefaultOperations in class Calculator) or polish its SWT or Swing UI.. ● Test your feature Run the unit tests. To keep the tutorial setup simple there are only unit tests for the logic but no UI tests. ● Commit your changes locally Now you want to create a new version of the local repository in your current feature branch containing your changes. This is called “commit”. There are two ways to perform a commit: with the Commit Dialog or from the Staging View. In this exercise we will use the Staging View. ● Open the Git Staging view and inspect the status Open the staging view by selecting Window > Show View > Other… > Git Staging. This view presents which files you have touched and which files will be in the next commit. “Unstaged Changes” lists those changes which you have done locally but which you have not yet added to the index. “Staged Changes” list those changes which you already have added to the index. You can drag and drop files from one area to the other. ● The Git Staging view should list two files “Calculator.java” and “Divide.java”. Double-click on “Calculator.java” to inspect which changes you have done.
  • 5. ● Drag and drop “Calculator.java” and “Divide.java” to the Staged Changes area to mark that they should be included in the next commit. ● Do another change in the class “Divide.java”. for example fix the copyright header. Now you have two entries for the file “Divide.java”. The next commit would only contain the changes which you have already staged.
  • 6. ● Enter a commit message (explaining why the change was done is more important than what was done since this can anyway be seen from the file diffs) ● Verify that “Author” and “Committer” contain both your full name and your correct e-mail address in the following format: John Doe <john.doe@example.org> ● If author and committer are not preset correctly you need to change the Git configuration parameters user.name and/or user.email. In this case cancel the dialog and open Preferences > Team > Git > Configuration > User Setting and correct the values for user.name and user.email . ● The Change-Id line is created when you select the button with the Gerrit icon ( ). It is needed for the Gerrit exercises. The button is automatically selected if you cloned a repository from Gerrit as described in exercise 1. Select the button if you want to push the commit to Gerrit later on. You can also add the Change-Id line later. ● If you want to push the commit to an Eclipse repository later also click the “Add signed- off-by” button since Eclipse uses this as your confirmation that you contribute the change under the Contribution License Agreement (CLA). This adds a footer which will be validated against the email address registered for your Eclipse account when you push the commit to an Eclipse repository Signed-of-by: John Doe < john.doe@example.org> ● Click Commit. As result your changes are locally committed. Copyright © 2014 by C. Halstrick, E. Kempin, S. Lay, S. Zivkov, M. Sohn