Share
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.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 Ubuntu Desktop, Ubuntu Server, Eclipse IDE, Java SE (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 Ubuntu.
Version 5 was updated on Jun. 14th, 2025.
Koichi NAKAGAWA
Transcript
181 slides
-
VERSION CONTROL TOOL (VER. 5) 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) Updated on Jun. 14th, 2025 -
Update Information • Ver. 5 : Use Ubuntu Server™ 24.04
LTS instead of Rocky Linux™, OpenJDK 21 instead of JDK 17 in all exercises and Ubuntu Desktop™ 24.04 LTS instead of Windows 10 as a client. • Ver. 4 : Use JDK 17 instead of JDK 11 in all exercises. • 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 -
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 Linux (Ubuntu™) Total EWA Development Exercise Jakarta Batch Java SE (OpenJDK™) Required Skills to take courses Test Tool with JUnit5 PostgreSQL™ Administration 4 Object Oriented Development Methodology -
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 -
• 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 and Web Developers™ logo( ) are trademarks of the Eclipse Foundation. • Eclipse Git Team Provider™, Eclipse EGit™, EGit™ is trademark of the Eclipse Foundation. • Java™ is trademark of Oracle Corporation. Trademarks Notice 6 -
Assumption for this course • The trainees who take this
course are required the following skills in advance • OpenJDK (Version: 21) • Eclipse IDE for Enterprise Java and Web Developers (Version: 2025-03 (4.35.0)) • Build Tool Training Course 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 -
Git™ Version Control Tool • Git™ Concepts • How to
set up Git™ and its Repositories • How to use EGit™ Eclipse Plug-in 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 -
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 -
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 -
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 -
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 -
Branch feature • Git™ – Branch (2) “master” branch “develop”
branch “special” branch “hotfix” branch 16 -
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 -
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 PC -
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 Repositor y xxx yyy zzz 19 -
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 -
• 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 -
• Configuration Example of EGit™ Exercise to configure EGit™ Configuration
Item Configuration Value Set Operator’s Name and Email address user.name: “Taro Yamada” 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. -
• 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. -
• Generate RSA Key for SSH communication On the “Preferences”
dialog menu, navigate to “SSH2” pane screen by selecting “General” “Network Connections” “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 -
• Choose “Staging View” or “Commit Dialog” for “Committing” Dialog
Menu On the “Preferences” dialog menu, navigate to “Committing” pane screen by selecting “Preferences” “Version Control (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. -
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 -
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 -
How to set up Git™ Server? • Procedure to set
up the Git™ Server (1) Install Git™ product on Ubuntu Server™ (2) Check firewall configuration for SSH communication and change it, if needed Set-up of Git™ Server Ubuntu Server™ Git™ Product SSH (2)Configure Firewall for SSH service, if needed firewalld (1) Install Git™ product 29 -
1. Install Git product on Ubuntu Server 24.04 $sudo apt-get
update $sudo apt-get install git 2. Check whether “SSH(port:22)” service is included as an “allowed” service to firewall $sudo ufw status Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere 22/tcp (v6) ALLOW Anywhere (v6) 3. (Option) If there is no SSH listed, configure firewall to include “SSH” service as an “allowed” service $sudo ufw allow ssh How to set up Git™ Server? • How to set up Git™ Server Procedure to install Git™ product on Ubuntu Server™ 24.04 and check & set firewall configuration Set-up of Git™ Server Check if there is SSH(port:22) service 30 -
Exercise to set up Git™ Server • Example of Set-up
of Git™ Server (1) Install Git™ product on Ubuntu Server™ 24.04. (2) As there is no firewall configuration for SSH communication, configure it. Set-up of Git™ Server Ubuntu Server™ Git™ Product SSH (2)Configure Firewall for SSH service, as Firewall is not configured for SSH service (1) Install Git™ product UFW 31 Exercise: Let’s set up Git™ Server with the above information. -
1. Install Git product on Ubuntu Server 24.04 $sudo apt-get
update $sudo apt-get install git 2. Check whether “SSH(port:22)” service is included as an “allowed” service to firewall $sudo ufw status Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere 22/tcp (v6) ALLOW Anywhere (v6) 3. (Option) If there is no SSH listed, configure firewall to include “SSH” service as an “allowed” service $sudo ufw allow ssh Exercise to set up Git™ Server • How to set up Git™ Server Procedure to install Git™ product on Ubuntu Server™ 24.04 and check firewall configuration Set-up of Git™ Server 32 -
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 Ubuntu Server™ Git™ Product SSH Git™ “bare” Remote Repository Git™ User UFW 33 -
• 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) $sudo useradd -m [Git User] $sudo passwd [Git User] 2. Setup ssh client environment $su – [Git User] $mkdir .ssh $vi .ssh/authorized_keys Input the Public Key of Client Account ← 3. Create Git “bare” Repository $sudo mkdir [Repository top folder] $sudo cd [Repository top folder] $sudo git init --bare [Repository name] Git™ “bare” Repository folder is created $sudo cd .. $sudo 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 34 Set-up of Git™ “bare” Remote Repository How to set up “bare” Remote Repository? -
Exercise to set up “bare” Remote Repository • Example of
Git™ “bare” Remote Repository on Git™ Server (1) Create “git” as a Git™ User in Ubuntu Server™ 24.04. (2) Create Git™ “bare” Repository named “projects.git” under “/var/lib/git” folder. Ubuntu Server™ Git™ Product SSH Git™ “bare” Repository: “/var/lib/git/projects.git” Git™ User: “git” UFW 35 Exercise: Let’s set up Git™ “bare” Remote Repository with the above information. Set-up of Git™ “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) $sudo useradd -m git $sudo passwd git Keep in mind the password you set here. 2. Setup ssh client environment $su – git $mkdir .ssh $vi .ssh/authorized_keys Input the Public Key of Client Account ← 3. Create Git “bare” Repository $sudo mkdir /var/lib/git $cd /var/lib/git $sudo git init --bare projects.git $cd .. $sudo chown -R git:git git Procedure to make Git™ “bare” Remote Repository on Ubuntu Server™ 24.04 36 Set-up of Git™ “bare” Remote Repository Exercise to set up “bare” Remote Repository -
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 Repositor y xxx yyy zzz Add a new project 37 -
• 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. /repository/ projectX /ws1/ projectX /projects.git/ projectX /projects.git/ projectX /repository2/ projectX /repository/ projectA projectX /ws1/ projectX /projects.git/ projectA projectX /ws2/ projectX 38 Set-up of Git™ Repositories with EGit™ How to set-up Git™ Repositories with EGit™? -
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 /ws1/ projectX Only the bare repository is created. /repository/ projectX /repository/ projectX /repository/ projectX 39 /projects.git/ projectX /repository/ projectX Set-up of Git™ Repositories with EGit™ -
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) 40 Set-up of Git™ Repositories with EGit™ -
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) 41 Set-up of Git™ Repositories with EGit™ -
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) 42 Set-up of Git™ Repositories with EGit™ -
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) 43 Set-up of Git™ Repositories with EGit™ -
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) 44 Set-up of Git™ Repositories with EGit™ -
Exercise to create new Git™ Repositories • 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. /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: $HOME/<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” Set-up of Git™ Repositories with EGit™ -
• 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 …”. 1. Create new Git™ Repositories for a project (1-1) 46 Set-up of Git™ Repositories with EGit™ Exercise to create new Git™ Repositories (1) -
• 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 “$HOME/<UserId>/git/repository” and confirm that “master” is “Default branch name” and click “Finish” button on “Create a New Git Repository” pane screen. 1. Create new Git™ Repositories for a project (1-2) 47 $HOME/<UserId>/git/repository Set-up of Git™ Repositories with EGit™ Exercise to create new Git™ Repositories (1) -
• 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. 1. Create new Git™ Repositories for a project (1-3) 48 Set-up of Git™ Repositories with EGit™ Exercise to create new Git™ Repositories (1) -
• 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 (2) 1. Create new Git™ Repositories for a project (2-1) 49 Set-up of Git™ Repositories with EGit™ -
• 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 (2) 1. Create new Git™ Repositories for a project with “Staging View” (2-1-1) 50 Set-up of Git™ Repositories with EGit™ -
• 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 (2) 1. Create new Git™ Repositories for a project with “Staging View” (2-1-2) 51 [email protected] Set-up of Git™ Repositories with EGit™ [email protected] -
• 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 (2) 1. Create new Git™ Repositories for a project with “Commit Dialog” (2-2) 52 Set-up of Git™ Repositories with EGit™ -
• 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 (3) 1. Create new Git™ Repositories for a project (3-1) 53 Set-up of Git™ Repositories with EGit™ -
• Push “master” branch to the remote repository Enter “origin”
in “Remote name” field. Enter “ssh://[email protected]/var/lib/git/ projects.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 (3) 1. Create new Git™ Repositories for a project (3-2) 54 Set-up of Git™ Repositories with EGit™ -
• 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 (3) 1. Create new Git™ Repositories for a project (3-3) 55 Set-up of Git™ Repositories with EGit™ -
• 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 (3) 1. Create new Git™ Repositories for a project (3-4) 56 Set-up of Git™ Repositories with EGit™ -
• 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 (4) 1. Create new Git™ Repositories for a project (4-1) 57 Set-up of Git™ Repositories with EGit™ -
• 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 (4) 1. Create new Git™ Repositories for a project (4-2) 58 Set-up of Git™ Repositories with EGit™ -
• 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 (4) 1. Create new Git™ Repositories for a project (4-3) 59 Set-up of Git™ Repositories with EGit™ -
• 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 (5) 1. Create new Git™ Repositories for a project (5-1) 60 Set-up of Git™ Repositories with EGit™ -
• 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 (5) 1. Create new Git™ Repositories for a project (5-2) 61 Set-up of Git™ Repositories with EGit™ -
• 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 (5) 1. Create new Git™ Repositories for a project (5-3) 62 Set-up of Git™ Repositories with EGit™ -
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 Local Repository Remote Repository /repository2/ projectX /projects.git/ projectX 2. Import a project existing in Git™ Remote repository (Summary) /repository2/ projectX /projects.git/ projectX /ws2/ projectX 63 Set-up of Git™ Repositories with EGit™ /repository2/ projectX /projects.git/ projectX /projects.git/ projectX -
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 JDK21 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) 64 Set-up of Git™ Repositories with EGit™ 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) 65 Set-up of Git™ Repositories with EGit™ 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) 66 Set-up of Git™ Repositories with EGit™ 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) 67 Set-up of Git™ Repositories with EGit™ Procedure to import Git™ Remote Repository -
Exercise to import Git™ Remote Repository • Sample to set
up Git™ Repositories by importing a Eclipse project of “simple” with EGit™ Local Repository Remote Repository 2. Import a project existing in Git™ Remote Repository (Exercise) /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: /home/<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” Set-up of Git™ Repositories with EGit™ Not Existed -
• 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. 2. Import a project existing in Git™ Remote Repository (1) 69 /home/<User Id>/eclipse-workspace/ws2 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (1) -
• (Option) Configure Installed JRE (1) [If JDK21 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. 70 2. Import a project existing in Git™ Remote Repository (2-1) Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (2) -
• (Option) Configure Installed JRE (2) [If JDK21 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. 71 2. Import a project existing in Git™ Remote Repository (2-2) Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (2) -
• (Option) Configure Installed JRE (3) [If JDK21 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. 72 2. Import a project existing in Git™ Remote Repository (2-3) Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (2) -
• Import an existing project in a Remote Repository In
Project Explorer, click “Import projects…” link to navigate to “Import” dialog screen. 2. Import a project existing in Git™ Remote Repository (3-1) 73 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (3) -
• 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. 2. Import a project existing in Git™ Remote Repository (3-2) 74 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (3) -
• Import an existing project in a Remote Repository Select
“Clone URI” and click “Next >” button on “Select Repository Source” pane screen. 2. Import a project existing in Git™ Remote Repository (3-3) 75 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (3) -
• Import an existing project in a Remote Repository Enter
“ssh://[email protected]/var/lib/g it/projects.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. 2. Import a project existing in Git™ Remote Repository (3-4) 76 192.168.122.100 ssh://[email protected]/var/lib/git/projects.git Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (3) -
• 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. 2. Import a project existing in Git™ Remote Repository (3-5) 77 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (3) -
• 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. 2. Import a project existing in Git™ Remote Repository (3-6) 78 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (3) -
• 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. 2. Import a project existing in Git™ Remote Repository (3-7) 79 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (3) -
• Import an existing project in a Remote Repository Confirm
the target project is selected and click “Finish” button on “Import Projects” pane screen. 2. Import a project existing in Git™ Remote Repository (3-8) 80 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (3) -
• 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…”. 2. Import a project existing in Git™ Remote Repository (4-1) 81 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (4) -
• 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. 2. Import a project existing in Git™ Remote Repository (4-2) 82 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (4) -
• 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. 2. Import a project existing in Git™ Remote Repository (4-3) 83 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (4) -
• 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…”. 2. Import a project existing in Git™ Remote Repository (5-1) 84 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (5) -
• 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. 2. Import a project existing in Git™ Remote Repository (5-2) 85 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (5) -
• 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. 2. Import a project existing in Git™ Remote Repository (5-3) 86 Set-up of Git™ Repositories with EGit™ Exercise to import Git™ Remote Repository (5) -
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 /exercise1/ projectX 87 Set-up of Git™ Repositories with EGit™ -
1) Switch Workspace back to an existing one - In
Project Explorer, right click on project Switch Workspace /home/<UserId>/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 “/home/<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) 88 How to add a project to existing Repositories? Set-up of Git™ Repositories with EGit™ -
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) 89 How to add a project to existing Repositories? Set-up of Git™ Repositories with EGit™ -
Exercise to set up Git™ and its Repository • Sample
to set up Existing Git™ Repositories for a new Eclipse project of “simple2” with EGit™ Local Repository Remote Repository 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: /home/<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 Set-up of Git™ Repositories with EGit™ -
• Switch the workspace back to “ws1” Select “File”
“Switch Workspace” “/home/<User Id>/workspace/ws1”. Eclipse IDE restarts with the new workspace. 3. Add a project to existing Git™ Repositories (1) <User Id>/workspace 91 Set-up of Git™ Repositories with EGit™ Exercise to set up Git™ and its Repository (1) <User Id>/workspace -
• 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 …”. 3. Add a project to existing Git™ Repositories (2-1) 92 Set-up of Git™ Repositories with EGit™ Exercise to set up Git™ and its Repository (2) -
• 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 “/home/<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. 3. Add a project to existing Git™ Repositories (2-2) 93 Set-up of Git™ Repositories with EGit™ Exercise to set up Git™ and its Repository (2) -
• 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…”. 3. Add a project to existing Git™ Repositories (3-1) 94 Set-up of Git™ Repositories with EGit™ Exercise to set up Git™ and its Repository (3) -
• 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. 95 3. Add a project to existing Git™ Repositories with “Staging View” (3-2-1) Set-up of Git™ Repositories with EGit™ Exercise to set up Git™ and its Repository (3) -
• 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. 96 Taro Yamada [email protected] 3. Add a project to existing Git™ Repositories with “Staging View” (3-2-2) Set-up of Git™ Repositories with EGit™ Exercise to set up Git™ and its Repository (3) -
• 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. 97 3. Add a project to existing Git™ Repositories with “Staging View” (3-2-3) Set-up of Git™ Repositories with EGit™ Exercise to set up Git™ and its Repository (3) -
• 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. 3. Add a project to existing Git™ Repositories with “Commit Dialog” (3-2-1) 98 Second Commit Set-up of Git™ Repositories with EGit™ Exercise to set up Git™ and its Repository (3) -
• 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. 3. Add a project to existing Git™ Repositories with “Commit Dialog” (3-2-2) 99 Repository: ssh://[email protected]/var/lib/git/projects.git Set-up of Git™ Repositories with EGit™ Exercise to set up Git™ and its Repository (3) Repository: ssh://[email protected]/var/lib/git/projects.git -
How to use EGit™? • Typical Operations with EGit™ on
Eclipse 2025-03 (4.35.0) Commit Check Commit History Branch/Tag Pull/Push from/to Git™ Server Compare with Past Commit/Tag Checkout Past Commit/Tag 101 -
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 -
• Commit some modifications on “master” Branch in the Local
Repository Exercise of Commit with EGit™ (1) 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 -
• Modify App.java of simple2 project and save it (1-1)
Exercise of Commit with EGit™ (1) Commit Insert 104 Save -
• Commit some modifications on “master” Branch in the Local
Repository (1-2) 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™ (1) Commit 105 -
• Commit some modifications on “master” Branch in the Local
Repository (1-3-1) Fill in the “Commit Message” field and check modified Git™ managed files in the “Staged Changes” field 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™ (1) 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 Using Staging View -
• Commit some modifications on “master” Branch in the Local
Repository (1-3-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™ (1) 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. -
• 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) -
• Check Commit History of a project Exercise of Commit
History with EGit™ (1) Local Repository Branch: “master” Folder: “repository” /repository/ simple2 Check Commit History Id: 984fc2 Id: dce21452 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” -
• 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™ (1) Check Commit History 110 -
• Check Commit History on “master” Branch in the Local
Repository (1-2) In “History” pane, “Commit History” is shown. Check Commit History Commit ID 111 Exercise of Commit History with EGit™ (1) -
How to use EGit™? Branch/Tag “master” Branch “develop” Branch “special”
Branch “hotfix” Branch 112 -
• 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 -
• 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: dce21452 Id: ec03a08 Id: 984fc2 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” -
• Check Local and Remote Branches in Commit History (1-1)
In “History” pane, confirm Local Branch and Remote Branch Exercise of Branch/Tag with EGit™ (1) Branch/Tag 115 Remote Branch Local Branch -
• Check Current Branch in Project Explorer (1-2) 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 -
• Create New Branch (named “develop”) Exercise of Branch/Tag with
EGit™ (2) Branch/Tag “master” Branch “develop” Branch Id: dce21452 /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” -
• Create New 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 Branch/Tag with EGit™ (2) Branch/Tag “master” branch 118 -
• Create New Branch (2-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 -
• Check New Branch (2-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 -
Id: 5da2a3e • 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: dce2542 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” -
• Prepare for Merging Branches (3-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 -
• Prepare for Merging Branches (3-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 -
• Merge Branches (3-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 -
• Merge Branches (3-4) 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 -
• Merge Branches (3-5) 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 -
• Merge Branches (3-6) 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 -
• Create Tag on the Current “master” Branch Exercise of
Branch/Tag with EGit™ (4) Branch/Tag “master” Branch “develop” Branch Id: 5da2e2a /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” -
• Create Tag on “master” Branch (4-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 -
• Create Tag on “master” Branch (4-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 -
• 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: 5da2a2e Id: 5da2a2e Push Id: b984fc2 131 Exercise: Let’s push commits and tags on Local Branch to the associated Remote Branch. /ws1/ simple2 Eclipse Workspace Branch: “master” Folder: “ws1” -
• Push commits and tags to existing Remote Branch (1-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 -
• Push commits and tags to existing Remote Branch (1-2)
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 -
• Push commits and tags to existing Remote Branch (1-3)
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 -
• Push commits and tags to existing Remote Branch (1-4)
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 -
• 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: 5da2e2a Push Id: 5da2e2a 136 Exercise: Let’s push the “develop” Local Branch to the Remote Repository. /ws1/ simple2 Eclipse Workspace Branch: “develop” Folder: “ws1” -
• Push new “develop” Branch to Remote Repository (2-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 -
• Push new “develop” Branch to Remote Repository (2-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”. -
• Push new “develop” Branch to Remote Repository (2-3) 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 -
• 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 -
• 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” Pull 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 -
• Switch the Eclipse™ workplace to “ws2” (3-1) Switch to
“ws2” workspace by selecting “File” “Switch Workspace” “/home/<UserId>/eclipse-workspace/ws2”. Exercise of Pull & Push with EGit™ (3) Pull/Push from/to Git™ Server /ws2/ simple Eclipse Workplace Folder: “ws2” 142 ws2 -
• Pull the latest artifacts from remote repository (3-2)
Right click on “simple” project and navigate to “Pull Result for repository2” 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 -
• Import “simple2” from the local repository (3-3) 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 -
• Import “simple2” from the local repository (3-4) 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 -
• Import “simple2” from the local repository (3-5) 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 -
• 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: 5da2e2a Id: 5da2e2a /ws2/ simple2 Eclipse Workplace Branch: “ develop” Folder: “ws2” Create New Branch + Pull 147 Exercise: Let’s pull a new “develop” Branch from the Remote Repository. -
• Pull a new “develop” Branch from Remote Branch (4-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 -
• Pull a new “develop” Branch from Remote Branch (4-2)
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 -
• Pull a new “develop” Branch from Remote Branch (4-3)
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 -
• Pull a new “develop” Branch from Remote Branch (4-4)
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” -
• 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: 2a59329 Pull Id: 2a59329 Id: 5da2e2a . . . 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: 2a59329 /ws2/ simple2 Eclipse Workplace Branch: “develop” Folder: “ws2” -
• Pull Latest Version from Remote Branch (5-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 -
• Pull Latest Version from Remote Branch (5-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 154 -
• Pull Latest Version from Remote Branch (5-3) 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 -
• Pull Latest Version from Remote Branch (5-4) Switch the
Eclipse Workspace to “ws1”. Exercise of Pull & Push with EGit™ (5) Pull/Push from/to Git™ Server 156 -
• Pull Latest Version from Remote Branch (5-5) Confirm
the current status of “develop” Branch and the latest Id is “5da2e2a”. 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 “5da2e2a”. 157 -
• Pull Latest Version from Remote Branch (5-6) 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 -
• Pull Latest Version from Remote Branch (5-7) Confirm the
result and click “Close” button. Confirm the latest Id is changed to “2a59329”. Exercise of Pull & Push with EGit™ (5) Pull/Push from/to Git™ Server 159 The new “develop” Id is changed to “2a59329”. -
• 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 -
• 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: 2a59329 (HEAD) Id: 5da2e2a 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” -
• 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…”. Compare with Past Commit/Tag 162 Exercise to compare with Past Commit/Tag (1) -
• 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. Compare with Past Commit/Tag 163 Exercise to compare with Past Commit/Tag (1) -
• Check the differences between Current Id (HEAD) and Specific
Id (1-3) In Synchronize, confirm the different files are listed. Right click on a different file and select “Open In Compare Editor” menu. Compare with Past Commit/Tag 164 Exercise to compare with Past Commit/Tag (1) -
• Check the differences between Current Id (HEAD) and Specific
Id (1-4) Confirm the different lines of the selected file. Compare with Past Commit/Tag 165 Exercise to compare with Past Commit/Tag (1) -
• Check the differences between Current Id (HEAD) and Specific
Tag Local Repository Branch: “develop” Folder: “repository” /repository/ simple2 Id: 2a59329 (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”. Exercise to compare with Past Commit/Tag (2) -
• Check the differences between Current Id (HEAD) and Specific
Tag (2-1) In Project Explore, right click on project “simple2” and navigate to “Compare” dialog screen by selecting “Compare With” “Branch, Tag or Reference…”. Compare with Past Commit/Tag 167 Exercise to compare with Past Commit/Tag (2) -
• Check the differences between Current Id (HEAD) and Specific
Tag (2-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. Compare with Past Commit/Tag 168 Exercise to compare with Past Commit/Tag (2) -
• Check the differences between Current Id (HEAD) and Specific
Tag (2-3) In Synchronize, confirm the different files are listed. Right click on a different file and select “Open In Compare Editor” menu. Compare with Past Commit/Tag 169 Exercise to compare with Past Commit/Tag (2) -
• Check the differences between Current Id (HEAD) and Specific
Tag (2-4) Confirm the different lines of the selected file. Compare with Past Commit/Tag 170 Exercise to compare with Past Commit/Tag (2) -
• 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 -
• Checkout a Past Tagged Commit Exercise to checkout a
Past Tagged Commit (1) Local Repository Branch: “develop” Folder: “repository2” /repository2/ simple2 Id: 2a59329 (HEAD) Id: 5da2e2a 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”. -
• Checkout a Past Tagged Commit (1-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”. Checkout Past Commit/Tag 173 Exercise to checkout a Past Tagged Commit (1) -
• Checkout a Past Tagged Commit (1-2) Select “ref/heads/master” and
click “Checkout” button on “Select a Branch for Checkout” dialog screen. Confirm the target project was checked out. Checkout Past Commit/Tag Check Out 174 You can switch back to “HEAD” by switching to the “develop” branch Exercise to checkout a Past Tagged Commit (1) -
Exercise1 • Create Git™ “bare” remote repository named “exercise.git” under
a directory of “/var/lib/git” on Git™ Server. Ubuntu Server™ Git™ Product SSH “bare” repository: “/var/lib/git/exercise.git” Git™ User: “git” UFW 176 -
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: /home/<UserId>/git /ws1/exercise1 Eclipse Workspace 177 Remote Name: “origin” Branch: “master” Folder: “exercise.git” Folder: “exercise.git” Folder: “ws1” Initial State After Exercise -
• 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” -
• 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” -
• 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” -
• 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”