Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Enterprise Web App. Development (2): Version Co...

Enterprise Web App. Development (2): Version Control Tool Training Ver. 3.1

This is the second course of a series of the courses for Enterprise Web Application development based on several Open Source products. As open source development tools, we are going to take care of Apache Maven as a build tool, Git as a version control tool and JUnit5 as a test tool. After then, we are going into the Jakarta EE framework. Therefore this series requires the basic skills of Windows 10, Rocky Linux, Eclipse IDE, Java SE (Oracle JDK, Open JDK), Payara Server and PostgreSQL. Regarding the Payara Server, we can use another Web Application Server conforming to Jakarta EE specification. As for PostgreSQL, we might be able to use another RDBMS product instead. We can also make use of another Linux distribution instead of Rocky Linux.

Koichi NAKAGAWA

November 26, 2020
Tweet

More Decks by Koichi NAKAGAWA

Other Decks in Programming

Transcript

  1. VERSION CONTROL TOOL (VER. 3.1) A part of the Open

    Source Development Tools Using Git™ with EGit™ Eclipse™ Plug-in 1 By Koichi NAKAGAWA Enterprise Web Application Development Course (2)
  2. Update Information • Ver. 3: Use Rocky Linux™ instead of

    CentOS™ as a Linux platform for Git Server. • Ver. 2 : Use JDK 11 instead of JDK 8 in all exercises. 2
  3. EWA development course curriculum JSF with CDI JPA + JTA

    with CDI JAX-RS Application Architecture Design Patterns Eclipse IDE™ Version Control Tool with Git™ Build Tool with Apache Maven™ Payara Server™ Administration Windows 10™ + Linux (Rocky Linux™) Total EWA Development Exercise Jakarta Batch Java SE (Oracle JDK™/OpenJDK™) Required Skills to take courses Test Tool with JUnit5 PostgreSQL™ Administration 4 Object Oriented Development Methodology
  4. Open Source Development Tools • Build Tool (Apache Maven™ with

    Eclipse™ Plug-in) • Version Control Tool (Git™ with Eclipse™ Plug-in) • Test Tool (JUnit5 with Eclipse™ Plug-in) 5
  5. Trademarks Notice • Git™ and the Git™ logo( ) are

    either registered trademarks or trademarks of Software Freedom Conservancy, Inc., corporate home of the Git Project, in the United States and/or other countries. • Apache™ Subversion® and the Apache™ Subversion® logo( ) are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.. • Eclipse IDE for Enterprise Java Developers™, the Eclipse IDE for Enterprise Java Developers™ logo( ) are trademarks of the Eclipse Foundation. • Eclipse GitTeam Provider™, Eclipse EGit™, EGit™ is trademark of the Eclipse Foundation. • Java™ is trademark of Oracle Corporation. 6
  6. Assumption for this course • The trainees who take this

    course are required the following skills in advance • Oracle JDK/OpenJDK (Version: 11) • Eclipse IDE for Enterprise Java Developers (Version: 2021-09 (4.21.0)) • Build Tool Training Course 7
  7. Objectives for this course • Learning the Git™ Version Control

    Tool, you will obtain the concepts of version control tool and how to operate it through EGit™ Eclipse™ plug-in for Git™. Additionally you will know how to set up the Git™ remote and local repositories. 8
  8. Git™ Version Control Tool • Git™ Concepts • How to

    set up Git™ and its Repositories • How to use EGit™ Eclipse Plug-in 9
  9. Open Source Version Control Tools History • Historical Version Control

    Tools RCS Open-source, Local data model based version control system managing versions for each file. => Developers manage versions of their own files. Apache™ Subversion® Open-source, Centralized version control system managing versions for each file. => Developers use a shared single repository. Git™ Open-source, Distributed version control system managing versions for whole project files. => Faster to commit, No single point failure, available Offline. 11
  10. Commit and Version Product.java (Ver.1) Product.java (Ver.2) Product.java (Ver.3) .

    . . Commit Commit Commit Local Repository Developer’s PC • Git™ – Source Code Management (SCM) -Version Control 12
  11. Versioning Unit • Git™ –Versioning for a whole project src

    main java resources webapp site test java resources Project X Local Repository 1. Commit for a whole project X 2. An ID is assigned for a whole project 3. Retrieve a whole project X by ID 13
  12. Tag feature • Git™ –Tag for a specific ID Project

    X Local Repository 1. Assign a tag for a specific ID 2. The tag is mapped to the ID 3. Retrieve a whole project X by tag ID:47834 ID:48342 ID:82349 ID:13843 ID:43589 COMMIT COMMIT COMMIT COMMIT COMMIT TAG TAG Rel. 1 Rel. 2 14
  13. Branch feature • Git™ – Branch (1) ID:47834 ID:48342 ID:82349

    ID:13843 ID:43589 ID:7364 ID:23442 ID:91349 New Branch Merge Branches “XYZ” Branch “ABC” Branch 15
  14. Branch feature • Git™ – Branch (2) “master” branch “develop”

    branch “special” branch “hotfix” branch 16
  15. Git™ Repositories • Git™ Repositories and Communications between Git™ Clients

    and Server Git™ Client PC Git™ Server Remote Repository Local Repository Git™ Client PC Local Repository . . . Server Push Pull Push Pull Access + Commit Access + Commit 17
  16. Team Development • Each member of Development Team communicates with

    Git™ Server Development Team Member A1 Development Team Member A2 Development Team Member A3 Git™ Server Remote Repository Server push push pull pull pull - Source/Resource files push Development Team A Repository xxx Project for xxx.jar 18
  17. Team Development • Development Teams communicate with Git™ Server Git™

    Server Remote Repository Server push push pull pull pull push Development Team A Development Team B Development Team C Depend Depend Project for zzz.war Project for yyy.jar Project for xxx.jar Repository xxx yyy zzz 19
  18. EGit™ • EGit™(Git Plug-in for Eclipse) EGit™ is a Git

    Plug-in for Eclipse and bundled into Eclipse IDE for Enterprise Java and Web Developers™ 21
  19. • Configure some items of EGit™ How to configure EGit™

    Set Operator’s Name and Email address Generate RSA Key for SSH communication Choose “Committing” Dialog Menu’s Type 22
  20. • Configuration Example of EGit™ Exercise to configure EGit™ Configuration

    Item Configuration Value Set Operator’s Name and Email address user.name: “TaroYamada” user.email: “[email protected]” Generate RSA Key for SSH communication Generate “RSA Key” providing any “Passphrase” Choose Committing Dialog Menu’s Type Choose “Staging View” or “Commit Dialog” 23 Exercise: Let’s configure EGit™ with the above information.
  21. • Set Operator’s Name to “Taro Yamada” and Email address

    to “[email protected]” From “Window” menu, Select “Preferences” and “Preferences” dialog menu comes up. Then navigate to “Configuration” pane screen by selecting “Version Control (Team)”  “Git”  “Configuration”. Exercise to configure EGit™ Fill in correct email and name Set Operator’s Name and Email address 24 Key Value user.name Taro Yamada user.email [email protected]  Enter “user.name” and “user.email” as “Key” and Your Name and Email Address as “Value”.  Click “Apply and Close” button.
  22. • Generate RSA Key for SSH communication On the “Preferences”

    dialog menu, navigate to “SSH2” pane screen by selecting “General”  “Network Connectivity”  “SSH2” Exercise to configure EGit™  Click “Key Management” tab.  Click “Generate RSA Key …” button.  Enter “Passphrase” and “Confirm passphrase” and click “Apply and Close” button.  If eclipse asked you if you want to create “.ssh” folder, please click “Yes” button. Generate RSA Key for SSH communication 25
  23. • Choose “Staging View” or “Commit Dialog” for “Committing” Dialog

    Menu On the “Preferences” dialog menu, navigate to “Committing” pane screen by selecting “Preferences”  “Team”  “Git”  “Committing” Exercise to configure EGit™ Check or Uncheck Choose “Committing” Dialog Menu’s Type 26  Uncheck “Use Staging View to commit instead of Commit Dialog”, if you want to use “Commit Dialog” menu.  Otherwise, leave it as it is to use “Staging View” for committing.
  24. Eclipse IDE for Enterprise Java Developer™ EGit™ Plug-in and Git™

    Server • EGit™: Eclipse Git Plug-in + Git™ Server EGit™ PC Git™ Server Remote Repository Local Repository Eclipse IDE for Enterprise Java Developer™ EGit™ PC Local Repository . . Server Push Pull Push Pull Access + Commit Access + Commit SSH, HTTP, etc. 27
  25. How to set up Git™ and its Repository? • Procedures

    to set up Git™ and its Repository Set-up of Git™ Server Set-up of Git™ “bare” Remote Repository Set-up of Git™ Repositories with EGit™ 28
  26. How to set up Git™ Server? • Procedure to set

    up the Git™ Server (1) Install Git™ product on Rocky Linux™ (2) Check firewall configuration for SSH communication and change it, if needed Set-up of Git™ Server Rocky Linux™ Git™ Product SSH (2)Configure Firewall for SSH service, if needed firewalld (1) Install Git™ product 29
  27. How to set up Git™ Server? • How to set

    up Git™ Server 1. Install Git product on Rocky Linux 8.5 #dnf -y install git 2. Check whether “ssh” service is included as an allowed service to firewall # firewall-cmd --list-all public (active) target: default icmp-block-inversion: no interfaces: enp0s3 enp0s8 sources: services: cockpit dhcpv6-client postgresql ssh ports: 8082/tcp : rich rules: 3. (Option) If there is no SSH listed, configure firewall to include “ssh” service as an allowed service # firewall-cmd --add-service=ssh --runtime-to-permanent Procedure to install Git™ product on Rocky Linux™ 8.5 and check & set firewall configuration Set-up of Git™ Server Check if there is SSH service 30
  28. Exercise to set up Git™ Server • Example of Set-up

    of Git™ Server (1) Install Git™ product on Rocky Linux™ 8.5. (2) As there is no firewall configuration for SSH communication, configure it. Set-up of Git™ Server Rocky Linux™ Git™ Product SSH (2)Configure Firewall for SSH service, as Firewall is not configured for SSH service (1) Install Git™ product firewalld 31 Exercise: Let’s set up Git™ Server with the above information.
  29. Exercise to set up Git™ Server • How to set

    up Git™ Server 1. Install Git product on Rocky Linux™ 8.5 #dnf -y install git 2. Check whether “ssh” service is included as an allowed service to firewall # firewall-cmd --list-all public (active) target: default icmp-block-inversion: no interfaces: enp0s3 enp0s8 sources: services: cockpit dhcpv6-client postgresql ssh ports: 8082/tcp : rich rules: 3. As there is no SSH listed, configure firewall to include “ssh” service as an allowed service # firewall-cmd --add-service=ssh --runtime-to-permanent Procedure to install Git™ product on Rocky Linux™ 8.5 and check firewall configuration Set-up of Git™ Server 32
  30. How to set up “bare” Remote Repository? • Example of

    Git™ “bare” Remote Repository on Git™ Server (1) Create Git™ User on Git™ Server (2) Create “bare” Git™ repository on Git™ Server Set-up of Git™ “bare” Remote Repository Rocky Linux™ Git™ Product SSH Git™ “bare” Remote Repository Git™ User firewalld 33
  31. How to set up “bare” Remote Repository? • How to

    make Git™ “bare” Remote Repository on Git™ Server 1. Create an Git User and set Password for the user (These Git User and Password are used to configure EGit™ later) #useradd [Git User] #passwd [Git User] 2. Create Git “bare” Repository #mkdir [Repository top folder] #cd [Repository top folder] #git init --bare [Repository name]  Git™ “bare” Repository folder is created #cd .. #chown -R [Git User]:[Git Group] [Repository top folder]  Change the owner of Git™ folders and files Procedure to make Git™ “bare” Remote Repository on Git™ Server Set-up of Git™ “bare” Remote Repository 34
  32. Exercise to set up “bare” Remote Repository? • Example of

    Git™ “bare” Remote Repository on Git™ Server (1) Create “git” as a Git™ User in Rocky Linux™ 8.5. (2) Create Git™ “bare” Repository named “projects.git” under “/var/lib/git” folder. Set-up of Git™ “bare” Remote Repository Rocky Linux™ Git™ Product SSH Git™ “bare” Repository: “/var/lib/git/projects.git” Git™ User: “git” firewalld 35 Exercise: Let’s set up Git™ “bare” Remote Repository with the above information.
  33. Exercise to set up “bare” Remote Repository? • How to

    make Git™ “bare” Remote Repository on Git™ Server 1. Create an Git User and set Password for the user (These Git User and Password are used to configure EGit™ later) #useradd git #passwd git  Keep in mind the password you set here. 2. Create Git “bare” Repository #mkdir /var/lib/git #cd /var/lib/git #git init --bare projects.git #cd .. #chown -R git:git git Procedure to make Git™ “bare” Remote Repository on Rocky Linux™ 8.5 Set-up of Git™ “bare” Remote Repository 36
  34. How to set-up Git™ Repositories with EGit™? • How to

    set-up Git™ Remote/Local Repositories with EGit™ Typical 3 ways to set-up Git™ Repositories with EGit™ (Eclipse™ Git Plug-in) Set-up of Git™ Repositories with EGit™ Typical 3 ways to set-up Git™ Repositories 1. Create a new project to Git™ Repositories from scratch 2. Import a project existing in Git™ Remote repository 3. Add a new project to existing Git™ Repositories Repository xxx yyy zzz Add a new project 37
  35. How to set-up Git™ Repositories with EGit™? • How to

    set up Git™ Repositories for a Eclipse project of “projectX” with EGit™ 3 Ways to set up Git™ Repositories with EGit™ Eclipse™ Plug-in on Eclipse™ 1. Create new Git™ Repositories for a project 2. Import a project existing in Git™ Remote repository 3. Add a project to existing Git™ Repositories Not Existed /projects.git Local Repository Remote Repository Not Existed /projects.git/ projectX /repository/ projectA /projects.git/ projectA Only the bare repository is created. Set-up of Git™ Repositories with EGit™ /repository/ projectX /ws1/ projectX /projects.git/ projectX /projects.git/ projectX /repository2/ projectX /repository/ projectA projectX /ws1/ projectX /projects.git/ projectA projectX /ws2/ projectX 38
  36. How to create new Git™ Repositories? • Step1: Convert an

    Eclipse™ project into a Git™ managed project on the “master” branch in Local Repository • Step2: Commit the Git™ managed project on the Local “master” branch • Step3: Push the committed Git™ project on the Local “master” branch to Remote Repository • Step4: Configure Push To Upstream • Step5: Configure Fetch From Upstream 1. Create new Git™ Repositories for a project (Summary) Not Existed /projects.git Local Repository Remote Repository /repository/ projectX /projects.git/ projectX /projects.git/ projectX Set-up of Git™ Repositories with EGit™ /ws1/ projectX Only the bare repository is created. /repository/ projectX /repository/ projectX /repository/ projectX 39 /projects.git/ projectX /repository/ projectX
  37. Procedure to create new Git™ Repositories 1) Convert an Eclipse

    project into a Git™ managed project on the “master” branch in Local Repository - In Project Explorer, right click on the target project and navigate to “Configure Git Repository” dialog screen by selecting “Team”  “Share Project …”. - Click “Create …” button next to Repository field on “Configure Git Repository” pane screen, and “Create a Git Repository” dialog screen comes up and enter or select “[Local Repository Folder Path]” as “Repository directory” and confirm that “master” is “Default branch name” and click “Finish” button on “Create a New Git Repository” pane screen. - Confirm the result and click “Finish” button on “Configure Git Repository” pane screen of “Configure Git Repository” dialog screen. 1. Create new Git™ Repositories for a project (Operations Summary) Set-up of Git™ Repositories with EGit™ 40
  38. Procedure to create new Git™ Repositories 2) Commit the Git™

    managed project on the Local “master” branch for the first time - In Project Explorer, confirm the “>” mark next to the target project and right click on the project and navigate to “Git Staging” pane screen or “Commit Changes” dialog screen by selecting “Team”  “Commit …”. [Using “Staging View”] - Click “ ” icon for “Unstaged Changes” list to move all files into “Staged Changes” list to be committed on “Git Staging” pane screen. -Fill in the “Commit Message” field and click “Commit” button on “Git Staging” pane screen and confirm that “>” mark next to the project has disappeared in the Project Explorer. [Using “Commit Dialog”] - Fill in the “Commit Message” field and check all Git™ managed files and click “Commit” button on “Commit Changes to repository” pane screen of “Commit Changes” dialog screen and confirm that “>” mark next to the project is disappeared in Project Explorer. 1. Create new Git™ Repositories for a project (Operations Summary) Set-up of Git™ Repositories with EGit™ 41
  39. Procedure to create new Git™ Repositories 3) Push the Local

    “master” branch to the Remote Repository - In Project Explorer, right click on the target project and navigate to “Push Branch master” dialog screen by selecting “Team”  “Push Branch ‘master’ …”. - Enter “origin” in “Remote name” field. Enter “ssh://[User Id]@[Host Name][Repository Path]” in URI field and enter password for git user in “Password” field and check the checkbox of “Store in Secure Store” and click “Preview >” button on “Destination Git Repository” pane screen and “Push to branch in remote” pane screen comes up. - Confirm that “Destination” is set “master” as its “Branch” and “Configure upstream to push and pull” is checked and “Merge” is selected as “When pulling” and then click “Preview >” button on “Push to branch in remote” pane screen. “Push Confirmation” pane screen comes up. - Select “master -> master [new branch]” and click “Push” button on “Push Confirmation” pane screen. Once the “Push Results” dialog screen appears, check it and click “Close” button. 1. Create new Git™ Repositories for a project (Operations Summary) Set-up of Git™ Repositories with EGit™ 42
  40. Procedure to create new Git™ Repositories 4) Configure Push to

    Upstream - In Project Explorer, right click on the target project, and navigate to “Configure Push” dialog screen by selecting “Team”  “Remote” “Configure Push to Upstream…”. - Click “Advanced…” button on “Configure push for remote ‘origin’” pane screen and “Push Ref Specifications” pane screen comes up. - Click “All Branches”, “All Tags” buttons and confirm that the following two entries were added in “Specifications for push” list. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* - Enable “Force Update” for both entries, and click “Finish” button. - Confirm new list of “Ref mappings” on “Configure push for remote ‘origin’” pane screen. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* - Click “Save” button. 1. Create new Git™ Repositories for a project (Operations Summary) Set-up of Git™ Repositories with EGit™ 43
  41. Procedure to create new Git™ Repositories 5) Configure Fetch from

    Upstream - In Project Explorer, right click on the target project and navigate to “Configure Fetch” dialog screen by selecting “Team”  “Remote”  “Configure Fetch from Upstream…”. - Click “Advanced…” button on “Configure fetch for remote ‘origin’” pane screen and “Fetch Ref Specifications” pane screen comes up. - Click “All Tags” buttons on “Fetch Ref Specification” dialog screen and confirm that the following entries were shown in “Specifications for fetch” list. - refs/heads/*:refs/remotes/origin/* - refs/tags/*:refs/tags/* - Enable “Force Update” for both entries, and click “Finish” button. - Confirm new list of “Ref mappings” on “Configure fetch for remote ‘origin’” pane screen. - refs/heads/*:refs/remotes/origin/* - refs/tags/*:refs/tags/* - Click “Save” button. 1. Create new Git™ Repositories for a project (Operations Summary) Set-up of Git™ Repositories with EGit™ 44
  42. Exercise to create new Git™ Repositories (1) • Sample to

    set up Git™ Repositories for a new Eclipse project of “simple” with EGit™ 1. Create new Git™ Repositories for a project (Exercise) Not Existed /projects.git Local Repository Remote Repository Only the bare repository is created. Set-up of Git™ Repositories with EGit™ /repository/ simple /ws1/ simple /projects.git/ simple Git Folder: /var/lib/git Git User: git Branch: “master” Folder: “ws1” Branch: “master” Folder: “repository” Git Folder: C:\Users\<UserId>\git 45 Exercise: Let’s create a new project to Git™ Repositories from scratch with the above information. Local Repository Remote Repository Eclipse Workspace Branch: “master” Folder: “projects.git”
  43. • Convert an Eclipse project into a project in Git™

    Local Repository In Project Explorer, right click on “simple” project and navigate to “Configure Git Repository” dialog screen by selecting “Team”  “Share Project …”. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (1-1) Set-up of Git™ Repositories with EGit™ 46
  44. • Convert an Eclipse project into a project on the

    “master” branch in Git™ Local Repository Click “Create …” button next to Repository field on “Configure Git Repository” pane screen, and “Create a Git Repository” dialog screen comes up. Enter or select a Local “Repository directory” like “C:\Users\<UserId>\git\repository” and confirm that “master” is “Default branch name” and click “Finish” button on “Create a New Git Repository” pane screen. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (1-2) Set-up of Git™ Repositories with EGit™ 47
  45. • Convert an Eclipse project into a project on the

    “master” branch in Git™ Local Repository Confirm the result and click “Finish” button on “Configure Git Repository” pane screen. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (1-3) Set-up of Git™ Repositories with EGit™ 48
  46. • Commit the project for the first time In Project

    Explorer, confirm the “>” mark next to the “simple” project. Right click on “simple” project and navigate to “Git Staging” pane screen or “Commit Changes” dialog screen by selecting “Team”  “Commit …”. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (2-1) Set-up of Git™ Repositories with EGit™ 49
  47. • Commit the project for the first time Click “

    ” icon for “Unstaged Changes” list to move all files into “Staged Changes” list to be committed on “Git Staging” pane screen. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project with “Staging View” (2-2-1) Set-up of Git™ Repositories with EGit™ 50
  48. • Commit the project for the first time Fill in

    the “Commit Message” field and click “Commit” button on “Git Staging” pane screen.  Confirm that “>” mark next to “simple” project has disappeared in the Project Explorer. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project with “Staging View” (2-2-2) Set-up of Git™ Repositories with EGit™ 51 Taro Yamada [email protected]
  49. • Commit the project for the first time  Fill

    in the “Commit Message” field and check all Git™ managed files and click “Commit” button on “Commit Changes to repository” pane screen of “Commit Changes” dialog screen.  Confirm that “>” mark next to “simple” project is disappeared in Project Explorer. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project with “Commit Dialog” (2-2) Set-up of Git™ Repositories with EGit™ 52
  50. • Push the Local “master” branch to the remote repository

    In Project Explorer, right click on “simple” project and navigate to “Push Branch master” dialog screen by selecting “Team”  “Push Branch ‘master’ …”. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (3-1) Set-up of Git™ Repositories with EGit™ 53
  51. • Push “master” branch to the remote repository Enter “origin”

    in “Remote name” field. Enter “ssh://[email protected]/var/lib/git/projec ts.git” in URI field and enter password for git user in “Password” field and check the checkbox of “Store in Secure Store” and click “Preview >” button on “Destination Git Repository” pane screen. “Push to branch in remote” pane screen comes up. Exercise to create new Git™ Repositories (1) ssh://[email protected]/var/lib/git/projects.git 1. Create new Git™ Repositories for a project (3-2) Set-up of Git™ Repositories with EGit™ 54 192.168.56.104
  52. • Push “master” branch to the remote repository Confirm that

    “Destination” is set “master” as its “Branch” and “Configure upstream to push and pull” is checked and “Merge” is selected as “When pulling” and then click “Preview >” button on “Push to branch in remote” pane screen. “Push Confirmation” pane screen comes up. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (3-3) Set-up of Git™ Repositories with EGit™ 55
  53. • Push “master” branch to the remote repository Select “master

    -> master [new branch]” and click “Push” button on “Push Confirmation” pane screen. Once the “Push Results” dialog screen appears, check it and click “Close” button. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (3-4) Set-up of Git™ Repositories with EGit™ 56
  54. • Configure Push to Upstream In Project Explorer, right click

    on the “simple” project, and navigate to “Configure Push” dialog screen by selecting “Team”  “Remote”  “Configure Push to Upstream…”. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (4-1) Set-up of Git™ Repositories with EGit™ 57
  55. • Configure Push to Upstream Click “Advanced…” button on “Configure

    push for remote ‘origin’” pane screen and “Push Ref Specifications” pane screen comes up. Click “All Branches”, “All Tags” buttons and confirm that the following two entries were added in “Specifications for push” list. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* Enable “Force Update” for both entries, and click “Finish” button. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (4-2) Set-up of Git™ Repositories with EGit™ 58
  56. • Configure Push to Upstream Confirm new list of “Ref

    mappings” on “Configure push for remote ‘origin’” pane screen. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* Click “Save” button. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (4-3) Set-up of Git™ Repositories with EGit™ 59
  57. • Configure Fetch from Upstream In Project Explorer, right click

    on the “simple” project and navigate to “Configure Fetch” dialog screen by selecting “Team”  “Remote”  “Configure Fetch from Upstream…”. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (5-1) Set-up of Git™ Repositories with EGit™ 60
  58. • Configure Fetch from Upstream Click “Advanced…” button on “Configure

    fetch for remote ‘origin’” pane screen and “Fetch Ref Specifications” pane screen comes up. Click “Add All Tags Spec” buttons on “Fetch Ref Specification” dialog screen. Confirm that the following entries were shown in “Specifications for fetch” list. - refs/heads/*:refs/remotes/origin/* - refs/tags/*:refs/tags/* Enable “Force Update” for both entries, and click “Finish” button. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (5-2) Set-up of Git™ Repositories with EGit™ 61
  59. • Configure Fetch from Upstream Confirm new list of “Ref

    mappings” on “Configure fetch for remote ‘origin’” pane screen. - refs/heads/*:refs/remotes/origin/* - refs/tags/*:refs/tags/* Click “Save” button. Exercise to create new Git™ Repositories (1) 1. Create new Git™ Repositories for a project (5-3) Set-up of Git™ Repositories with EGit™ 62
  60. How to import Git™ Remote Repository? • Step1: Import from

    Remote Repository to Local Repository and Eclipse™ Workplace • Step2: Configure Push To Upstream • Step3: Configure Fetch From Upstream Not Existed /projects.git/ projectX Local Repository Remote Repository /repository2/ projectX /projects.git/ projectX 2. Import a project existing in Git™ Remote repository (Summary) /repository2/ projectX /projects.git/ projectX Set-up of Git™ Repositories with EGit™ /ws2/ projectX 63 /repository2/ projectX /projects.git/ projectX
  61. Procedure to import Git™ Remote Repository 1) Create a new

    exercise workspace - Navigate to “Eclipse IDE Launcher” dialog screen by selecting “File”  “Switch Workspace”  “Other…” and fill in the new workspace folder path of “[New Workspace Name]” and click “Launch” button on “Select a directory as workspace” pane screen. Then Eclipse IDE restarts with the new workplace. 2) (Option) Configure Installed JRE [If JDK11 has not been selected yet] - Select “Window”  “Preferences” and “Preferences” dialog screen comes up and select “Java”  “Installed JREs” and click “Add …” button on the “Installed JREs” pane screen. - Select “Standard VM” and click “Next >” button on “JRE Type” pane screen and click “Directory …” button and select an installed JDK home directory on “JRE Definition” pane screen and confirm the new list of “JRE system libraries” and click “Finish” button. - Check the added JDK entry from “Installed JREs” list on the “Installed JREs” pane screen and click “Apply and Close” button. 2. Import a project existing in Git™ Remote Repository (Operations Summary) Set-up of Git™ Repositories with EGit™ 64
  62. Procedure to import Git™ Remote Repository 3) Import an existing

    project from a Remote Repository into a newly created Local Repository folder - In Project Explorer, click “Import projects…” link to navigate to “Import” dialog screen. - Select “Git”  “Projects from Git” in “Select an import wizard” field and click “Next >” button on “Select” pane screen. - Select “Clone URI” and click “Next >” button on “Select Repository Source” pane screen. - Enter “ssh://[User Id]@[Host Name][Repository Path]” in URI field. And Enter password for “git” user and click the checkbox of “Store in Secure Store” and click “Next >” button on “Source Git Repository” pane screen. - Confirm “master” branch is shown and the checkboxes for it is checked and click “Next >” button on “Branch Selection” pane screen. - Confirm the Git Local Repository Path like “[Local Repository Folder Path]” in “Directory” field of “Destination” and “master” as “Initial branch” and “origin” as “Remote name” and click “Next >” button on “Local Destination” pane screen. - Confirm “Importing existing Eclipse projects” is selected as “Wizard for project import” and click “Next >” button on “Select a wizard to use for importing projects” pane screen. - Confirm the target project is selected and click “Finish” button on “Import Projects” pane screen. 2. Import a project existing in Git™ Remote Repository (Operations Summary) Set-up of Git™ Repositories with EGit™ 65
  63. Procedure to import Git™ Remote Repository 4) Configure Push to

    Upstream - In Project Explorer, right click on the target project, and navigate to “Configure Push” dialog screen by selecting “Team”  “Remote” “Configure Push to Upstream…”. - Click “Advanced…” button on “Configure push for remote ‘origin’” pane screen and “Push Ref Specifications” pane screen comes up. - Click “All Branches”, “All Tags” buttons and confirm that the following two entries were added in “Specifications for push” list. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* - Enable “Force Update” for both entries, and click “Finish” button. - Confirm new list of “Ref mappings” on “Configure push for remote ‘origin’” pane screen. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* - Click “Save and Push” button and confirm the push results and click “Close” button on “Push Results” dialog screen. 2. Import a project existing in Git™ Remote Repository (Operations Summary) Set-up of Git™ Repositories with EGit™ 66
  64. Procedure to import Git™ Remote Repository 5) Configure Fetch from

    Upstream - In Project Explorer, right click on the target project and navigate to “Configure Fetch” dialog screen by selecting “Team”  “Remote”  “Configure Fetch from Upstream…”. - Click “Advanced…” button on “Configure fetch for remote ‘origin’” pane screen and “Fetch Ref Specifications” pane screen comes up. - Click “All Tags” buttons on “Fetch Ref Specification” dialog screen and confirm that the following entries were shown in “Specifications for fetch” list. - refs/heads/*:refs/remotes/origin/* - refs/tags/*:refs/tags/* - Enable “Force Update” for both entries, and click “Finish” button. - Confirm new list of “Ref mappings” on “Configure fetch for remote ‘origin’” pane screen. - refs/heads/*:refs/remotes/origin/* - refs/tags/*:refs/tags/* - Click “Save” button. 2. Import a project existing in Git™ Remote Repository (Operations Summary) Set-up of Git™ Repositories with EGit™ 67
  65. Exercise to import Git™ Remote Repository (2) • Sample to

    set up Git™ Repositories by importing a Eclipse project of “simple” with EGit™ Local Repository Remote Repository Set-up of Git™ Repositories with EGit™ 2. Import a project existing in Git™ Remote Repository (Exercise) Not Existed /projects.git/ simple /projects.git/ simple /repository2/ simple “master” branch Branch: “master” Folder: “repository2” /ws2/ simple Branch: “master” Folder: “ws2” Git Folder: /var/lib/git/ Git User: git Git Folder: C:\Users\<UserId>\git 68 Exercise: Let’s import a project existed in Git™ Remote Repositories with the above information. Remote Repository Local Repository Eclipse Workspace Branch: “master” Folder: “projects.git”
  66. • Create a new exercise workspace named “ws2”  Navigate

    to “Eclipse IDE Launcher” dialog screen by selecting “File”  “Switch Workspace”  “Other…”  Fill in the new workspace folder path of “ws2” and click “Launch” button on “Select a directory as workspace” pane screen.  Eclipse IDE restarts with the new workspace. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (1) 69 C:\Users\<User Id>\eclipse-workspace\ws2 Set-up of Git™ Repositories with EGit™
  67. • (Option) Configure Installed JRE (1) [If JDK11 has not

    been selected yet]  Select “Window”  “Preferences” and “Preferences” dialog screen comes up.  Select “Java”  “Installed JREs” and click “Add …” button on the “Installed JREs” pane screen. Exercise to set up Git™ and its Repository (2) 70 2. Import a project existing in Git™ Remote Repository (2-1) Set-up of Git™ Repositories with EGit™
  68. • (Option) Configure Installed JRE (2) [If JDK11 has not

    been selected yet]  Select “Standard VM” and click “Next >” button on “JRE Type” pane screen.  Click “Directory …” button and select an installed JDK home directory on “JRE Definition” pane screen.  Confirm the new list of “JRE system libraries” and click “Finish” button. Exercise to set up Git™ and its Repository (2) 71 2. Import a project existing in Git™ Remote Repository (2-2) Set-up of Git™ Repositories with EGit™
  69. • (Option) Configure Installed JRE (3) [If JDK11 has not

    been selected yet]  Check the added JDK entry from “Installed JREs” list on the “Installed JREs” pane screen.  Click “Apply and Close” button. Exercise to set up Git™ and its Repository (2) 72 2. Import a project existing in Git™ Remote Repository (2-3) Set-up of Git™ Repositories with EGit™
  70. • Import an existing project in a Remote Repository In

    Project Explorer, click “Import projects…” link to navigate to “Import” dialog screen. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (3-1) Set-up of Git™ Repositories with EGit™ 73
  71. • Import an existing project in a Remote Repository Select

    “Git”  “Projects from Git” in “Select an import wizard” field and click “Next >” button on “Select” pane screen. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (3-2) Set-up of Git™ Repositories with EGit™ 74
  72. • Import an existing project in a Remote Repository Select

    “Clone URI” and click “Next >” button on “Select Repository Source” pane screen. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (3-3) Set-up of Git™ Repositories with EGit™ 75
  73. • Import an existing project in a Remote Repository Enter

    “ssh://[email protected]/var/lib/git/pro jects.git” in URI field. And Enter password for “git” user and click the checkbox of “Store in Secure Store” on “Source Git Repository” pane screen. Click “Next >” button. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (3-4) Set-up of Git™ Repositories with EGit™ 76 192.168.175.100 ssh://[email protected]/var/lib/git/projects.git
  74. • Import an existing project in a Remote Repository Confirm

    “master” branch is shown and the “Tag fetching strategy” checkbox for “When fetching a commit, also fetch its tags” is checked on “Branch Selection” pane screen. Click “Next >” button. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (3-5) Set-up of Git™ Repositories with EGit™ 77
  75. • Import an existing project in a Remote Repository Set

    the Git Local Repository Path like “C:\Users\<UserId>\git\repository2” in “Directory” field of “Destination” and confirm “master” as “Initial branch” and “origin” as “Remote name” are selected on “Local Destination” pane screen. Click “Next >” button. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (3-6) Set-up of Git™ Repositories with EGit™ 78
  76. • Import an existing project in a Remote Repository Confirm

    “Importing existing Eclipse projects” is selected as “Wizard for project import” on “Select a wizard to use for importing projects” pane screen. Click “Next >” button. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (3-7) Set-up of Git™ Repositories with EGit™ 79
  77. • Import an existing project in a Remote Repository Confirm

    the target project is selected and click “Finish” button on “Import Projects” pane screen. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (3-8) Set-up of Git™ Repositories with EGit™ 80
  78. • Configure Push to Upstream In Project Explorer, right click

    on the “simple” project, and navigate to “Configure Push” dialog screen by selecting “Team”  “Remote”  “Configure Push to Upstream…”. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (4-1) Set-up of Git™ Repositories with EGit™ 81
  79. • Configure Push to Upstream  Click “Advanced…” button on

    “Configure push for remote ‘origin’” pane screen and “Push Ref Specifications” pane screen comes up.  Click “All Branches”, “All Tags” buttons and confirm that the following two entries were added in “Specifications for push” list. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* Enable “Force Update” for both entries, and click “Finish” button.  “Configure push for remote ‘origin’” pane screen comes up. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (4-2) Set-up of Git™ Repositories with EGit™ 82
  80. • Configure Push to Upstream Confirm the new “Ref mappings”

    on “Configure push for remote ‘origin’” pane screen. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* Click “Save and Push” button. Confirm the push results on “Push Results” dialog screen. Click “Close” button. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (4-3) Set-up of Git™ Repositories with EGit™ 83
  81. • Configure Fetch from Upstream In Project Explorer, right click

    on the “simple” project and navigate to “Configure Fetch” dialog screen by selecting “Team”  “Remote”  “Configure Fetch from Upstream…”. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (5-1) Set-up of Git™ Repositories with EGit™ 84
  82. • Configure Fetch from Upstream Click “Advanced…” button on “Configure

    fetch for remote ‘origin’” pane screen. Click “All Tags” button on “Fetch Ref Specification” pane screen. Confirm that the following entries were shown in “Specifications for fetch”. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* Enable “Force Update” for both entries. Click “Finish” button. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (5-2) Set-up of Git™ Repositories with EGit™ 85
  83. • Configure Fetch from Upstream Confirm the new “Ref mappings”

    on “Configure fetch for remote ‘origin’” pane screen. -refs/heads/*:refs/heads/* -refs/tags/*:refs/tags/* Click “Save” button. Exercise to set up Git™ and its Repository (2) 2. Import a project existing in Git™ Remote Repository (5-3) Set-up of Git™ Repositories with EGit™ 86
  84. How to add a project to existing Repositories? • Step1:

    Convert a Eclipse project into a Git™ managed project in the Local Repository • Step2: Push the project to Remote Repository /projects.git/ projectA Local Repository Remote Repository /repository/ projectA, projectX /projects.git/ projectA 3. Add a project to existing Git™ Repositories (Summary) /repository/ projectA /repository/ projectA, projectX /projects.git/ projectA, projectX Set-up of Git™ Repositories with EGit™ /exercise1/ projectX 87
  85. How to add a project to existing Repositories? 1) Switch

    Workspace back to an existing one - In Project Explorer, right click on project  Switch Workspace  C:\Users\<User Id>\workspace\<Existing Workspace Name> 2) Convert a new project to a Git™ managed project under an existing Local Repository - In Project Explorer, right click on the target project and navigate to “Share Project” dialog screen by selecting “Team”  “Share Project …”. - Click drop-down button of Repository field on “Configure Git Repository” pane screen and select an existing Local Repository like “C:\Users\<UserId>\git\repository\.git” and confirm the Target Location of the target project and click “Finish” button. - Confirm the branch name of the Git™ managed project is “master” with the Project Explorer. 3. Add a project to existing Git™ Repositories (Operations Summary) Set-up of Git™ Repositories with EGit™ 88
  86. How to add a project to existing Repositories? 3) Commit

    & Push the project to the Remote Repository - In Project Explorer, right click on the target project and navigate to “Git Staging” pane screen or “Commit Changes” dialog screen by selecting “Team”  “Commit…”. [Using “Staging View”] - Click “ ” icon for “Unstaged Changes” list to move all files into “Staged Changes” list to be committed on “Git Staging” pane screen and fill in the “Commit Message” field and click “Commit and Push” button. - Confirm Push Results on “Pushed to repository - origin” pane screen and click “Close” button. - Confirm that “>” mark next to the target project is disappeared in Project Explorer. [Using “Commit Dialog”] - Fill in the “Commit Message” field on “Commit Changes to Git Repository” pane screen and check all Git™ managed files and click “Commit and Push” button. - Confirm the Destination and click “Preview” button on “Push to branch in remote” pane screen. - Confirm the expected push result and click “Push” button on “Push Confirmation” pane screen and confirm the push result and click “Close” button on “Pushed to ssh://…” dialog screen. - Confirm that “>” mark next to “simple2” project is disappeared in Project Explorer. 3. Add a project to existing Git™ Repositories (Operations Summary) Set-up of Git™ Repositories with EGit™ 89
  87. Exercise to set up Git™ and its Repository (3) •

    Sample to set up Existing Git™ Repositories for a new Eclipse project of “simple2” with EGit™ Local Repository Remote Repository Set-up of Git™ Repositories with EGit™ 3. Add a project to existing Git™ Repositories (Exercise) /projects.git/ simple /repository/ simple “master” branch “master” branch /repository/ simple simple2 /ws1/ simple2 /projects.git/ simple simple2 Branch: “master” Folder: “ws1” Branch: “master” Folder: “repository” Git Folder: /var/lib/git/ Git User: git Git Folder: C:\Users\<UserId>\git 90 Exercise: Let’s add a project to existing Git™ Repositories with the above information. Local Repository Remote Repository Branch: “master” Folder: “projects.git” Eclipse Workspace
  88. • Switch the workspace back to “ws1” Select “File” 

    “Switch Workspace”  “C:\Users\<User Id>\workspace\ws1”. Eclipse IDE restarts with the new workspace. Exercise to set up Git™ and its Repository (3) 3. Add a project to existing Git™ Repositories (1) Set-up of Git™ Repositories with EGit™ 91
  89. • Convert an Eclipse project into a Git™ managed project

    in the existing Local Repository In Project Explorer, right click on “simple2” project and navigate to “Share Project” dialog screen by selecting “Team”  “Share Project …”. Exercise to set up Git™ and its Repository (3) 3. Add a project to existing Git™ Repositories (2-1) Set-up of Git™ Repositories with EGit™ 92
  90. • Convert an Eclipse project into a Git™ managed project

    in the existing Local Repository Click drop-down button of Repository field on “Configure Git Repository” pane screen and select an existing Local Repository like “C:\Users\<UserId>\git\repository\.git” Confirm the Target Location of the project “simple2” Click “Finish” button. Confirm the branch name of the Git™ managed project is “master” with the Project Explorer. Exercise to set up Git™ and its Repository (3) 3. Add a project to existing Git™ Repositories (2-2) Set-up of Git™ Repositories with EGit™ 93
  91. • Commit & Push the project to the Remote Repository

    In Project Explorer, right click on “simple2” project and navigate to “Git Staging” pane screen or “Commit Changes” dialog screen by selecting “Team”  “Commit…”. Exercise to set up Git™ and its Repository (3) 3. Add a project to existing Git™ Repositories (3-1) Set-up of Git™ Repositories with EGit™ 94
  92. • Commit & Push the project to the Remote Repository

    Click “ ” icon for “Unstaged Changes” list to move all files into “Staged Changes” list to be committed on “Git Staging” pane screen. Exercise to set up Git™ and its Repository (3) Set-up of Git™ Repositories with EGit™ 95 3. Add a project to existing Git™ Repositories with “Staging View” (3-2-1)
  93. • Commit & Push the project to the Remote Repository

    Fill in the “Commit Message” field and click “Commit and Push” button on “Git Staging” pane screen. Exercise to set up Git™ and its Repository (3) Set-up of Git™ Repositories with EGit™ 96 Taro Yamada [email protected] 3. Add a project to existing Git™ Repositories with “Staging View” (3-2-2)
  94. • Commit & Push the project to the Remote Repository

    Confirm Push Results on “Pushed to repository - origin” pane screen. Click “Close” button. Confirm that “>” mark next to “simple2” project is disappeared in Project Explorer. Exercise to set up Git™ and its Repository (3) Set-up of Git™ Repositories with EGit™ 97 3. Add a project to existing Git™ Repositories with “Staging View” (3-2-3) Repository: ssh://[email protected]/var/lib/git/projects.git
  95. • Commit & Push the project to the Remote Repository

     Fill in the “Commit Message” field on “Commit Changes to Git Repository” pane screen.  Check all Git™ managed files.  Click “Commit and Push” button.  Confirm the Destination and click “Preview” button on “Push to branch in remote” pane screen. Exercise to set up Git™ and its Repository (3) 3. Add a project to existing Git™ Repositories with “Commit Dialog” (3-2-1) Set-up of Git™ Repositories with EGit™ 98 Second Commit
  96. • Commit & Push the project to the Remote Repository

     Confirm the expected push result and click “Push” button on “Push Confirmation” pane screen.  Confirm the push result and click “Close” button on “Pushed to ssh://…” dialog screen.  Confirm that “>” mark next to “simple2” project is disappeared in Project Explorer. Exercise to set up Git™ and its Repository (3) 3. Add a project to existing Git™ Repositories with “Commit Dialog” (3-2-2) Set-up of Git™ Repositories with EGit™ 99 Repository: ssh://[email protected]/var/lib/git/projects.git
  97. How to use EGit™? • Typical Operations with EGit™ on

    Eclipse 2021-06 (4.20.0) Commit Check Commit History Branch/Tag Pull/Push from/to Git™ Server Compare with Past Commit/Tag Checkout Past Commit/Tag 101
  98. Branch • Commit some modifications on a Branch How to

    use EGit™? Commit Branch Get Project(s) Commit Project(s) : Commit Points Finish Modification (HEAD) (NEW HEAD) Modify Source Files Modify Source Files 102
  99. • Commit some modifications on “master” Branch in the Local

    Repository Exercise of Commit with EGit™ Commit Committed Local Repository Branch: “master” Folder: “repository” /repository/ simple2 Modified App.java Committed App.java 103 Exercise: After modification of a Java source file, let’s commit it on the “master” branch in the Local Repository with the above information. /ws1/ simple2 Eclipse Workspace Branch: “master” Folder: “ws1” Commit Modification
  100. • Modify App.java of simple2 project and save it (1)

    Exercise of Commit with EGit™ Commit Insert 104 Save
  101. • Commit some modifications on “master” Branch in the Local

    Repository (2-1) In Project Explorer, right click on “simple2” project and navigate to “Staging View” pane or “Commit Changes” dialog screen by selecting “Team”  “Commit…”. Exercise of Commit with EGit™ Commit 105
  102. • Commit some modifications on “master” Branch in the Local

    Repository (2-2-1) Fill in the “Commit Message” field and check modified Git™ managed files and click “Commit” button. Confirm that the “>” mark next to the project “simple2” is disappeared and all the projects in the same repository have the up-arrow mark with a figure of one(1) next to the branch name is added in Project Explorer. Exercise of Commit with EGit™ Commit Note: This operation commits only to the Local Repository. When you click “Commit and Push” button instead of “Commit”, Commit is done to both the Local Repository and the Remote Repository. 106 Add a Message. Using Staging View
  103. • Commit some modifications on “master” Branch in the Local

    Repository (2-2-2) Fill in the “Commit Message” field and check modified Git™ managed files and click “Commit” button on “Commit Changes” dialog screen. Confirm that the “>” mark next to the project “simple2” is disappeared and all the projects in the same repository have the up-arrow mark with a figure of one(1) next to the branch name is added in Project Explorer. Exercise of Commit with EGit™ Commit Note: This operation commits only to the Local Repository. When you click “Commit and Push” button instead of “Commit”, Commit is done both to the Local Repository and the Remote Repository. 107 Using Commit Dialog Add a Message.
  104. • Commit Ids in Commit History (When, Who, Branches, Parent

    Id, Child Id, …) How to use EGit™? Check Commit History : Commit Ids (HEAD) Commit History Commit Commit Commit Commit (Branch A, C) 108 Commit (Branch B)
  105. • Check Commit History of a project Exercise of Commit

    History with EGit™ Local Repository Branch: “master” Folder: “repository” /repository/ simple2 Check Commit History Id: 6744c54 Id: 4e724aa 109 Exercise: Let’s check Commit History of the project “simple2”. Remote Repository Remote Name: “origin” Branch: “master” Folder: “projects.git” /projects.git/ simple2 /ws1/ simple2 Eclipse Workspace Branch: “master” Folder: “ws1”
  106. • Check Commit History on “master” Branch in the Local

    Repository (1-1) In Project Explorer, right click on “simple2” project and navigate to “History” pane by selecting “Team”  “Show in History”. Exercise of Commit History with EGit™ Check Commit History 110
  107. • Check Commit History on “master” Branch in the Local

    Repository (1-2) In “History” pane, “Commit History” is shown. Exercise of Commit History with EGit™ Check Commit History Commit ID 111
  108. • Local and Remote Branches How to use EGit™? Branch/Tag

    Local “A” Branch (HEAD) Commit Commit Remote “A” Branch Local Repository Remote Repository Synchronize Branch “A” <<General Rule>> • “Pull” once a day (Typically the first thing in the morning) • “Commit” + “Push” soon once Tests are passed. Push Pull Commit Push Pull Push Push Push 113
  109. • Check Local and Remote Branches in Commit History •

    Check Current Branch with Project Explorer Exercise of Branch/Tag with EGit™ (1) Branch/Tag Local Repository Branch: “master” Folder: “repository” /repository/ simple2 /projects.git/ simple2 Remote Repository Remote Name: “origin” Branch: “master” Folder: “projects.git” Id: 6744c54 Id: 4e724aa Id: 4e724aa 114 Exercise: Let’s check Commit History of the project “simple2” in Local and Remote Branches, and Current Branch with Project Explore. /ws1/ simple2 Eclipse Workspace Branch: “master” Folder: “ws1”
  110. • Check Local and Remote Branches in Commit History In

    “History” pane, confirm Local Branch and Remote Branch Exercise of Branch/Tag with EGit™ (1) Local Branch Branch/Tag 115 Remote Branch
  111. • Check Current Branch in Project Explorer In Project Explore,

    confirm Current Branch Exercise of Branch/Tag with EGit™ (1) Branch/Tag Local Repository Name Current Branch 1 Commit is ready for pushing to Upstream 116
  112. • Create New Branch (named “develop”) Exercise of Branch/Tag with

    EGit™ (2) Branch/Tag “master” Branch “develop” Branch Id: 6744c54 /repository/ simple2 Local Repository Branch: “master” Folder: “repository” Create New Branch 117 Exercise: Let’s create a New Branch named “develop”. /ws1/ simple2 Eclipse Workspace Branch: “master” Folder: “ws1” /repository/ simple2 Local Repository Branch: “develop” Folder: “repository” /ws1/ simple2 Eclipse Workspace Branch: “develop” Folder: “ws1”
  113. • Create New Branch (1-1) In Project Explore, right click

    on “simple2” project and navigate to “Create Branch” dialog screen by selecting “Team”  “Switch To”  “New Branch…”. Exercise of Branch/Tag with EGit™ (2) Branch/Tag “master” branch 118
  114. • Create New Branch (1-2) Enter “develop” in the Branch

    name field as New Branch and click “Finish” button on “Create a new branch in repository repository” pane screen. Exercise of Branch/Tag with EGit™ (2) Branch/Tag “master” branch as Source 119
  115. • Check New Branch (1-3) Confirm New Branch in Project

    Explorer and Git History. Exercise of Branch/Tag with EGit™ (2) Branch/Tag Current Branch Local “develop” Branch 120
  116. Id: cfbcf59 • Merge Branches Exercise of Branch/Tag with EGit™

    (3) Branch/Tag “master” Branch “develop” Branch /repository/ simple2 Local Repository Branch: “master” Folder: “repository” Merge Branches 121 Exercise: Let’s modify the “develop” branch and merge it into the “master” branch. Id: 6744c54 Modify /ws1/ simple2 Eclipse Workspace Branch: “master” Folder: “ws1” /repository/ simple2 Local Repository Branch: “master” with “develop” Folder: “repository” /ws1/ simple2 Eclipse Workspace Branch: “master” with “develop” Folder: “ws1”
  117. • Prepare for Merging Branches (1-1) Edit App.java of “simple2”

    project on “develop” Branch further and save it. Confirm “>” marks are added on affected project, source folders and file in Project Explorer. Exercise of Branch/Tag with EGit™ (3) Branch/Tag Add 122 Save
  118. • Prepare for Merging Branches (1-2) Commit on the “develop”

    Branch by right clicking on “simple2” project and navigate to “Git Staging” pane screen or “Commit Changes” dialog screen by selecting “Team”  “Commit…” and select the updated file and set a commit message and click “Commit” button, but don’t click “Commit and Push” button. Confirm the “develop” Branch in Project Explore and Commit History. Exercise of Branch/Tag with EGit™ (3) Branch/Tag Id for “develop” Branch is different from Id for “master” Branch Current Branch 123
  119. • Merge Branches (3)  In Project Explore, right click

    on “simple2” project and switch to “master” branch by selecting “Team”  “Switch To”  “master”.  Confirm that the current Branch is switched back to “master” in Project Explore. Exercise of Branch/Tag with EGit™ (3) Branch/Tag 124 Current Branch
  120. • Merge Branches (4-1)  In Project Explore, right click

    on “simple2” project and navigate to “Merge ‘master’” dialog screen by selecting “Team”  “Merge…”. Exercise of Branch/Tag with EGit™ (3) Branch/Tag 125
  121. • Merge Branches (4-2)  Select the Local “develop” Branch

    and click “Merge” button to merge the “develop” Branch to current “master” Branch on “Merge ‘master’” pane screen. Confirm the result and click “OK” button on “Merge Result” dialog screen. Exercise of Branch/Tag with EGit™ (3) Branch/Tag 126
  122. • Merge Branches (4-3)  Confirm the “master” and “develop”

    Branches in Project Explore and Git History. Exercise of Branch/Tag with EGit™ (3) Branch/Tag Id for “develop” Branch is equal to Id for “master” Branch 127
  123. • Create Tag on the Current “master” Branch Exercise of

    Branch/Tag with EGit™ (4) Branch/Tag “master” Branch “develop” Branch Id: cfbcf59 /repository/ simple2 Local Repository Branch: “master” Folder: “repository” Tag: 1.0 128 Exercise: Let’s create a Tag on the Current “master” Branch. /ws1/ simple2 Eclipse Workspace Branch: “master” Folder: “ws1” /repository/ simple2 Local Repository Branch: “master” Tag: “1.0” Folder: “repository”
  124. • Create Tag on “master” Branch (1-1)  In Project

    Explore, right click on “simple2” project and navigate to “Create New Tag” dialog screen by selecting “Team”  “Advanced”  “Create Tag…”. Exercise of Branch/Tag with EGit™ (4) Branch/Tag “master” branch 129
  125. • Create Tag on “master” Branch (1-2)  Fill in

    “Tag name” and “Tag message” fields and click “Create Tag” button on “Create New Tag on Branch ‘master’” pane screen. Check the created Tag in Commit History. Exercise of Branch/Tag with EGit™ (4) Branch/Tag Created Tag 130
  126. • Push commits and tags on Local Branch to associated

    Remote Branch Exercise of Pull & Push with EGit™ (1) Pull/Push from/to Git™ Server Local Repository Branch: “master” Tag: “1.0” Folder: “repository” /repository/ simple2 /projects.git/ simple2 Remote Repository Remote Name: “origin” Branch: ”master” Tag: “1.0” Folder: “projects.git” Id: cfbcf59 Id: cfbcf59 Push Id: 4e724aa 131 Exercise: Let’s push commits and tags on Local Branch to the associated Remote Branch. /ws1/ simple2 Eclipse Workspace Branch: “master” Folder: “ws1”
  127. • Push commits and tags to existing Remote Branch (1)

    Confirm the current status of Local and Remote Branches in Project Explore and Commit History. Exercise of Pull & Push with EGit™ (1) 2 Commits have not been pushed to Git™ Server yet Local “master” Branch Pull/Push from/to Git™ Server Remote “master” Branch Different Ids are pointed to. 132
  128. • Push commits and tags to existing Remote Branch (2-1)

     In Project Explore, right click on “simple2” project navigate to “Push Branch master” dialog screen by selecting “Team”  “Push Branch ‘master’ …”.  Check Source and Destination and Click “Preview >” button on “Push to branch in remote” pane screen. Exercise of Pull & Push with EGit™ (1) Pull/Push from/to Git™ Server 133
  129. • Push commits and tags to existing Remote Branch (2-2)

    Confirm “Push” Preview and click “Push” button on “Push Confirmation” pane screen. Check the “Push” Results and click “Close” button on “Pushed Results ssh://…” dialog screen. Exercise of Pull & Push with EGit™ (1) Pull/Push from/to Git™ Server 134
  130. • Push commits and tags to existing Remote Branch (2-3)

     Confirm the result in Project Explore and Commit History. Exercise of Pull & Push with EGit™ (1) Pull/Push from/to Git™ Server All Commits have been pushed to Git™ Server Local and Remote “master” Branches point to the same Id 135
  131. • Push new “develop” Branch to Remote Repository Exercise of

    Pull & Push with EGit™ (2) Pull/Push from/to Git™ Server Local Repository Branch: “develop” Folder: “repository” /repository/ simple2 /projects.git/ simple2 Remote Repository Remote Name: “origin” New Branch: ”develop” Folder: “projects.git” Id: cfbcf59 Push Id: cfbcf59 136 Exercise: Let’s push the “develop” Local Branch to the Remote Repository. /ws1/ simple2 Eclipse Workspace Branch: “develop” Folder: “ws1”
  132. • Push new “develop” Branch to Remote Repository (1) Confirm

    the current status of “develop” branch in Project Explore and Commit History. Exercise of Pull & Push with EGit™ (2) Pull/Push from/to Git™ Server “develop” Branch exists only in the Local repository(There is no Remote “develop” Branch). Current Branch is “master”. 137
  133. • Push new “develop” Branch to Remote Repository (2) In

    Project Explore, right click on “simple2” project and change Branch to “develop” by selecting “Team”  “Switch To”  “develop”. Exercise of Pull & Push with EGit™ (2) Pull/Push from/to Git™ Server 138 Branch is changed to “develop”.
  134. • Push new “develop” Branch to Remote Repository (3-1) In

    Project Explore, right click on “simple2” project and navigate to “Push Branch develop” dialog screen by selecting “Team”  “Push Branch ‘develop’ …”. Check Source and Destination and click “Preview>” button on “Push to branch in remote” pane screen. Exercise of Pull & Push with EGit™ (2) Pull/Push from/to Git™ Server 139
  135. • Push new “develop” Branch to Remote Repository (3-2) 

    Confirm the expected push result and click “Push” button on “Push Confirmation” pane screen.  Confirm the result and click “Close” button on “Push Results ssh://…” dialog screen.  Confirm the Remote “develop” Branch was created. Exercise of Pull & Push with EGit™ (2) Pull/Push from/to Git™ Server Local and Remote “develop” Branches point to the same Id 140 New Branch
  136. • Pull and Import a new project from Remote Repository

    Exercise of Pull & Push with EGit™ (3) Pull/Push from/to Git™ Server Local Repository Branch: “master” Folder: “repository2” /repository2/ simple /projects.git/ simple simple2 Remote Repository Remote Name: “origin” Branch: ”master” Folder: “projects.git” Eclipse Workplace Branch: “master” Folder: “ws2” /ws2/ simple /repository2/ simple simple2 /ws2/ simple Pull /repository2/ simple simple2 /ws2/ simple simple2 Import There is no source file under /ws2, but only configuration for projects exists Old Version 141 Exercise: Let’s pull and import the “master” Branch from the Remote Repository. New Version Initial State Step. 1 Step. 2
  137. • Switch the Eclipse™ workplace to “ws2” (1) Switch to

    “ws2” workspace by selecting “File”  “Switch Workspace”  “C:\Users\<UserId>\eclipse-workspace\ws2”. Exercise of Pull & Push with EGit™ (3) Pull/Push from/to Git™ Server /ws2/ simple Eclipse Workplace Folder: “ws2” 142
  138. • Pull the latest artifacts from remote repository (2) Right

    click on “simple” project and navigate to “Pull Result …” dialog screen by selecting “Team”  “Pull”. Check the Pull Result and click “Close” button. Exercise of Pull & Push with EGit™ (3) Pull/Push from/to Git™ Server /projects.git/ simple simple2 Pull /repository2/ simple simple2 /ws2/ simple Local Repository Branch: “master” Folder: “repository2” Remote Repository Remote Name: “origin” Branch: “ master” Folder: “projects.git” Eclipse Workplace Branch: “master” Folder: “ws2” Pull /ws2/ simple 143 Old simple project
  139. • Import “simple2” from the local repository (3-1)  In

    Project Explorer, right click and navigate to “Import” dialog screen by selecting “Import”  “Import…”.  Select “Git” “Projects from Git” and click “Next>” button on “Select” pane screen. Exercise of Pull & Push with EGit™ (3) Pull/Push from/to Git™ Server /repository2/ simple simple2 /ws2/ simple simple2 Import Local Repository Branch: “master” Directory: “repository2” Eclipse Workplace Branch: “master” Directory: “ws2” 144
  140. • Import “simple2” from the local repository (3-2)  Select

    “Existing local repository” and click “Next>” button on “Select Repository Source” pane screen.  Select the Local Repository “repository2[master]” and click “Next>” button on “Select a Git Repository” pane screen. Exercise of Pull & Push with EGit™ (3) Pull/Push from/to Git™ Server 145
  141. • Import “simple2” from the local repository (3-3)  Select

    “Import existing Eclipse projects” and click “Next>” button on “Select a wizard to use for importing projects” pane screen.  Select “simple2” project and click “Finish” button on “Import Projects” pane screen. Exercise of Pull & Push with EGit™ (3) Pull/Push from/to Git™ Server 146
  142. • Pull a new “develop” Branch from Remote Branch Exercise

    of Pull & Push with EGit™ (4) Pull/Push from/to Git™ Server Local Repository New Branch: “develop” Folder: “repository2” /repository2/ simple2 /projects.git/ simple2 Remote Repository Remote Name: “origin” Branch: “ develop” Folder: “projects.git” Id: c2c8e3d Id: faef3c8 /ws2/ simple2 Eclipse Workplace Branch: “ develop” Folder: “ws2” 147 Exercise: Let’s pull a new “develop” Branch from the Remote Repository.
  143. • Pull a new “develop” Branch from Remote Branch (1)

    Check the current status of Branch and confirm that the Local “develop” Branch does NOT exist. Exercise of Pull & Push with EGit™ (4) Pull/Push from/to Git™ Server Current Branch is “master” “develop” Branch exists only in the Remote repository. 148
  144. • Pull a new “develop” Branch from Remote Branch (2-1)

    In Project Explore, right click on “simple2” project and navigate to “Create Branch” dialog screen by selecting “Team”  “Switch To”  “New Branch…”. Exercise of Pull & Push with EGit™ (4) Pull/Push from/to Git™ Server 149
  145. • Pull a new “develop” Branch from Remote Branch (2-2)

    Click “Select…” button on “Create a new branch in repository repository2” pane screen. Select “origin/develop” Branch and click “OK” button on “Select Source” dialog screen. Exercise of Pull & Push with EGit™ (4) Pull/Push from/to Git™ Server 150
  146. • Pull a new “develop” Branch from Remote Branch (2-3)

    Confirm Source is changed to “origin/develop” and Branch name becomes “develop” and click “Finish” button on “Create a new branch in repository repository2” pane screen. Confirm Current Branch is “develop” and Local “develop” Branch was created. Exercise of Pull & Push with EGit™ (4) Pull/Push from/to Git™ Server 151 “develop” Branch was created in the Local repository. Current Branch is “develop”
  147. • Pull Latest Version from Remote Branch Exercise of Pull

    & Push with EGit™ (5) Pull/Push from/to Git™ Server Local Repository Branch: “develop” Folder: “repository” /repository/ simple2 /projects.git/ simple2 Remote Repository Remote Name: “origin” Branch: “ develop” Folder: “projects.git” Id: 53ee3bf Pull Id: 53ee3bf Id: faef3c8 . . . Update Commit+Push Another Developer 152 Exercise: Let’s pull a new “develop” Branch from the Remote Repository. /ws1/ simple2 Eclipse Workplace Branch: “develop” Folder: “ws1” Local Repository Branch: “develop” Folder: “repository2” /repository2/ simple2 Id: 53ee3bf /ws2/ simple2 Eclipse Workplace Branch: “develop” Folder: “ws2”
  148. • Pull Latest Version from Remote Branch (1) Modify the

    source file of “simple2” project on the Local “develop” Branch. Exercise of Pull & Push with EGit™ (5) Pull/Push from/to Git™ Server 153 Save
  149. • Pull Latest Version from Remote Branch (2-1) Commit the

    modified project on the Local “develop” Branch and Push it to the Remote Repository. Exercise of Pull & Push with EGit™ (5) Pull/Push from/to Git™ Server 154
  150. • Pull Latest Version from Remote Branch (2-2) Commit the

    modified project on the Local “develop” Branch and Push it to the Remote Repository. Exercise of Pull & Push with EGit™ (5) Pull/Push from/to Git™ Server 155
  151. • Pull Latest Version from Remote Branch (3) Switch the

    Eclipse Workspace to “ws1”. Exercise of Pull & Push with EGit™ (5) Pull/Push from/to Git™ Server 156
  152. • Pull Latest Version from Remote Branch (4) Confirm the

    current status of “develop” Branch and the latest Id is “cfbcf59”. Exercise of Pull & Push with EGit™ (5) Pull/Push from/to Git™ Server Current Branch is “develop” The Id for the Local “develop” Branch is “cfbcf59”. 157
  153. • Pull Latest Version from Remote Branch (5-1) In Project

    Explore, right click on “simple2” project and navigate to “Pull Result for repository” dialog screen by selecting “Team”  “Pull”. Exercise of Pull & Push with EGit™ (5) Pull/Push from/to Git™ Server 158
  154. • Pull Latest Version from Remote Branch (5-2) Confirm the

    result and click “Close” button. Confirm the latest Id is changed to “0f3ecea”. Exercise of Pull & Push with EGit™ (5) Pull/Push from/to Git™ Server 159 The new “develop” Id is changed to “0f3ecea”.
  155. • Check the differences between Current Id (HEAD) and Specific

    Id/Tag How to use EGit™? Branch : Commit Points (HEAD) Commit Commit Commit Commit Commit Compare with Past Commit/Tag : Tags Compare 160
  156. • Check the differences between Current Id (HEAD) and Specific

    Id Exercise to compare with Past Commit/Tag (1) Local Repository Branch: “develop” Folder: “repository” /repository/ simple2 Id: 0f3ecea (HEAD) Id: 0fbcf59 Check Differences Compare with Past Commit/Tag 161 Exercise: Let’s check the differences in source files between HEAD and the previous commit. /ws1/ simple2 Eclipse Workplace Branch: “develop” Folder: “ws1”
  157. • Check the differences between Current Id (HEAD) and Specific

    Id (1-1)  In Project Explore, right click on “simple2” project and navigate to “Select a Commit” dialog screen by selecting “Compare With”  “Commit…”. Exercise to compare with Past Commit/Tag (1) Compare with Past Commit/Tag 162
  158. • Check the differences between Current Id (HEAD) and Specific

    Id (1-2)  Select the target compared Id and click “Select” button on “4 commits in repository repository” pane screen.  Confirm Open Perspective Dialog menu and click “Yes” button on “Confirm Open Perspective” pane screen. Exercise to compare with Past Commit/Tag (1) Compare with Past Commit/Tag 163
  159. • Check the differences between Current Id (HEAD) and Specific

    Id (2-1)  In Synchronize, confirm the different files are listed.  Right click on a different file and select “Open In Compare Editor” menu. Exercise to compare with Past Commit/Tag (1) Compare with Past Commit/Tag 164
  160. • Check the differences between Current Id (HEAD) and Specific

    Id (2-2)  Confirm the different lines of the selected file. Exercise to compare with Past Commit/Tag (1) Compare with Past Commit/Tag 165
  161. • Check the differences between Current Id (HEAD) and Specific

    Tag Exercise to compare with Past Commit/Tag (2) Local Repository Branch: “develop” Folder: “repository” /repository/ simple2 Id: 0f3ecea (HEAD) Tag: 1.0 Check Differences Compare with Past Commit/Tag 166 /ws1/ simple2 Eclipse Workplace Branch: “develop” Folder: “ws1” Exercise: Let’s check the differences in source files between HEAD and the commit tagged “1.0”.
  162. • Check the differences between Current Id (HEAD) and Specific

    Tag (1-1)  In Project Explore, right click on project “simple2” and navigate to “Compare” dialog screen by selecting “Compare With”  “Branch, Tag or Reference…”. Exercise to compare with Past Commit/Tag (2) Compare with Past Commit/Tag 167
  163. • Check the differences between Current Id (HEAD) and Specific

    Tag (1-2)  Select the target compared Tag and click “Compare” button on “Compare ‘simple2’ with a Branch, Tag, or Reference” pane screen.  Confirm Open Perspective Dialog menu and click “Yes” button on “Confirm Open Perspective” dialog screen. Exercise to compare with Past Commit/Tag (2) Compare with Past Commit/Tag 168
  164. • Check the differences between Current Id (HEAD) and Specific

    Tag (2-1)  In Synchronize, confirm the different files are listed.  Right click on a different file and select “Open In Compare Editor” menu. Exercise to compare with Past Commit/Tag (2) Compare with Past Commit/Tag 169
  165. • Check the differences between Current Id (HEAD) and Specific

    Tag (2-2)  Confirm the different lines of the selected file. Exercise to compare with Past Commit/Tag (2) Compare with Past Commit/Tag 170
  166. • Checkout a Past Commit/Tag How to use EGit™? Branch

    : Commit Points (HEAD) Commit Commit Commit Commit Commit : Tags Checkout Checkout Past Commit/Tag Old Project Files 171
  167. • Checkout a Past Tagged Commit Exercise to checkout a

    Past Tagged Commit Local Repository Branch: “develop” Folder: “repository2” /repository2/ simple2 Id: 0f3ecea (HEAD) Id: cfbcf59 Tag: 1.0 Checkout Past Commit/Tag Checkout 172 /ws1/ simple2 Eclipse Workplace Branch: “develop” Folder: “ws1” Exercise: Let’s check out source files of the project with the commit tagged “1.0”.
  168. • Checkout a Past Tagged Commit (1) In Project Explorer,

    select “simple2” project. In History pane, right click on the target “1.0” Tag and navigate to “Select a Branch for Checkout” dialog screen by selecting “Check Out”. Exercise to checkout a Past Tagged Commit Checkout Past Commit/Tag 173
  169. • Checkout a Past Tagged Commit (1) Select “ref/heads/master” and

    click “Checkout” button on “Select a Branch for Checkout” dialog screen. Confirm the target project was checked out. Exercise to checkout a Past Tagged Commit Checkout Past Commit/Tag Check Out 174 You can switch back to “HEAD” by switching to the “develop” branch
  170. Exercise1 • Create Git™ “bare” remote repository named “exercise.git” under

    a directory of “/var/lib/git” on Git™ Server. Rocky Linux 8.5 Git™ Product SSH “bare” repository: “/var/lib/git/exercise.git” Git™ User: “git” firewalld 176
  171. Exercise2 • Set up Git™ repositories for a Eclipse project

    of “exercise1” with EGit™ Not Existed /exercise.git Local Repository Remote Repository Only the bare repository is created. /exercise/ exercise1 /ws1/exercise1 /exercise.git/ exercise1 Git Folder: /var/lib/git Git User: git Branch: “master” Folder: “ws1” Branch: “master” Folder: “exercise” Git Folder: C:\Users\<UserId>\git /ws1/exercise1 Eclipse Workspace 177 Remote Name: “origin” Branch: “master” Folder: “exercise.git” Folder: “exercise.git” Folder: “ws1” Initial State After Exercise
  172. • Create New Branch (named “develop”) Exercise3 (1) “master” Branch

    “develop” Branch Id: xxxxxxx /exercise/ exercise1 Local Repository Branch: “master” Folder: “exercise” Create New Branch 178 /ws1/ exercise1 Eclipse Workspace Branch: “master” Folder: “ws1” /exercise/ exercise1 Local Repository Branch: “develop” Folder: “exercise” /ws1/ exercise1 Eclipse Workspace Branch: “develop” Folder: “ws1”
  173. • Update & Commit to “develop” Branch • Push to

    Remote Repository Exercise3 (2) “develop” Branch Update & Commit Id: yyyyy 179 /exercise.git/ exercise1 Remote Repository Remote Name: “origin” Branch: “develop” Folder: “exercise.git” Push /exercise/ exercise1 Local Repository Branch: “develop” Folder: “exercise” /ws1/ exercise1 Eclipse Workspace Branch: “develop” Folder: “ws1”
  174. • Merge “develop” Branch to “master” Branch • Push to

    Remote Repository Exercise3 (3) “master” Branch “develop” Branch Merge Id: yyyyy 180 /exercise.git/ exercise1 Push /exercise/ exercise1 Local Repository Branch: “master” Folder: “exercise” /ws1/ exercise1 Eclipse Workspace Branch: “master” Folder: “ws1” Remote Repository Remote Name: “origin” Branch: “master” with “develop” Folder: “exercise.git” /exercise/ exercise1 Local Repository Branch: “master” with “develop” Folder: “exercise”
  175. • Attach a Tag named “Release_1.2” to “master” Branch •

    Push to Remote Repository Exercise3 (4) “master” Branch Tag Release_1.2 181 /exercise.git/ exercise1 Push Remote Repository Remote Name: “origin” Branch: “master” with “develop” Tag: “Release_1.2” Folder: “exercise.git” /exercise/ exercise1 Local Repository Branch: “master” with “develop” Tag: “Release_1.2” Folder: “exercise” /exercise/ exercise1 Local Repository Branch: “master” with “develop” Tag: Nothing Folder: “exercise”