SlideShare a Scribd company logo
Work on branches in parallel
In this exercise you learn how you can efficiently work in different branches in parallel. A
common situation is that you want to switch to another branch and you want to temporarily
save your work on the current branch. You will learn two possibilities:
● Amend: Commit an unfinished change and replace this commit later with a new,
refined commit using the amend feature of git.
● Stash: Put your change into the git stash area with the stash command
Preparation
Follow exercise 2, “Develop a feature/bug fix” to create a commit on a feature branch based
on the remote tracking branch origin/master.
Start working on another feature
● Create a new local branch based on the remote tracking branch “origin/master”
● You may create the new branch from the History View :
○ Select the project, then click Show In > History (Some views, e.g. in the Java
EE-Perspective, do not have this shortcut, in this case use Team > Show in
History)
○ In the history view click all toggle buttons as shown in the screenshot
(“Link with Editor and Selection”, “Show all changes in Repository”, “Compare
Mode”, “Show all branches”)
○
Click “Create Branch...” on the commit where“origin/master” points to
● Or you may do that from the Repositories View :
select the remote tracking branch origin/master and click Create Branch
● Enter “addMultiplyOperation” as the name of the new branch, make sure the
“Checkout new branch” is selected and click Finish
● Check that now you don’t see the changes of the first exercise anymore in your
workspace.
● Start working on a change, e.g. add a MultiplyOperation, do not commit yet, first
read on.
Save your work temporarily
Now you want to switch to another branch but you want to continue working at your new
feature later on. There are two ways to achieve that: doing a preliminary commit and use
amend later to continue your work or use stash. You may do this exercise twice to try both
ways.
Preliminary Commit
The easiest thing to do is to just commit your work in progress and amend that commit later
to replace the preliminary commit.
● Open the Git Staging View
● Enter a preliminary message, e.g. “WIP ...” for Work in Progress, stage the files to be
committed and click on Commit
Stash
Select Stash Changes on the repository node in the Git Repositories View. As a result
you will get a new node in the view. It contains a list of all the stashed changes. The label
contains the current branch, the id and the commit message of the current commit.
Note that untracked files are not stashed by default. If you are using at least EGit 3.4 you
can include untracked files by checking the corresponding option.
In older versions you have to drag and drop an untracked file to the “Staged Changes” area
before you can stash it.
Switch to another branch
● Now you can switch to the first feature branch “addDivideOperation”, either by double
clicking on the branch node in the Git Repositories View, by selecting “Team >
Switch to > addDivideOperation” or by clicking “Checkout” in the History View.
● Check that your workspace contains the changes you committed in your first feature
(implementing divide) branch. You could now continue working here. For example:
you may want to fix the division by zero issue if it is not already handled. If you do
any changes in the “addDivideOperation” branch don’t forget to commit them before
the next step
● Switch back to the “addMultiplyOperation” branch
Continue working on the branch to add Multiply
Case 1: Preliminary Commit
● Do another change in the workspace improving Multiply.
● Compare your changed project with the first, preliminary commit by selecting
Compare With > HEAD revision. This will show you the changes you will add on top
of the first commit.
● Compare your changed project with the parent commit of your first, preliminary
commit by selecting Compare With > Previous revision. This will show you the
changes you will have in your new commit after the next step.
Create a new commit with the combined changes of your first, preliminary commit
and your current changes
● Open the Git Staging View
● Click the “Amend” button as shown below.
● Now you see again the commit message of the last commit you made in this branch.
Change it to something meaningful, stage the change and click the Commit button.
● In the History View you can now see that your first, preliminary commit was replaced
by the new one.
Case 2: Stash
● In the Repositories View, select Apply Stashed Changes on the stash entry.
● Note that you can apply the stashed change on any commit in your repository. This is
useful if you have started on a branch but you realize that you would like to continue
on another branch. If you apply the stashed commit on another base version this may
lead to conflicts you may have to resolve in this case.
Copyright © 2014 by C. Halstrick, E. Kempin, S. Lay, S. Zivkov, M. Sohn
Ad

More Related Content

Similar to Git Tutorial EclipseCon France 2014 - Git Exercise 03 - work on branches in parallel (20)

Git Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebase
Git Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebaseGit Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebase
Git Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebase
msohn
 
Git Branching and Merging.pptx
Git Branching and Merging.pptxGit Branching and Merging.pptx
Git Branching and Merging.pptx
tapanvyas11
 
The benefits of using Git
The benefits of using GitThe benefits of using Git
The benefits of using Git
Yannick Warnier
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review changeGit Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
msohn
 
Chicago alm user group git demo script and notes
Chicago alm user group   git demo script and notesChicago alm user group   git demo script and notes
Chicago alm user group git demo script and notes
Dave Burnison
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
mobaires
 
GDSC Git event 2023.pptx
GDSC Git event 2023.pptxGDSC Git event 2023.pptx
GDSC Git event 2023.pptx
fsxflyer789Productio
 
Mastering GIT
Mastering GITMastering GIT
Mastering GIT
Hasnaeen Rahman
 
Mastering Git Worktree - Enhancing Your Version Control Workflow
Mastering Git Worktree - Enhancing Your Version Control WorkflowMastering Git Worktree - Enhancing Your Version Control Workflow
Mastering Git Worktree - Enhancing Your Version Control Workflow
Jignesh Boricha
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
Md. Ahsan Habib Nayan
 
Developing with versioning and CI/CD
Developing with versioning and CI/CDDeveloping with versioning and CI/CD
Developing with versioning and CI/CD
Matteo Di Carlo
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
Sebin Benjamin
 
E caregitpresentation
E caregitpresentationE caregitpresentation
E caregitpresentation
Rakesh Kumar Shardiwal
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
King Hom
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
James Ford
 
GIT Rebasing and Merging
GIT Rebasing and MergingGIT Rebasing and Merging
GIT Rebasing and Merging
Ashok Kumar Satuluri
 
Technical Seminar Series: GIT Pull Requests Best Practices
Technical Seminar Series:  GIT Pull Requests Best PracticesTechnical Seminar Series:  GIT Pull Requests Best Practices
Technical Seminar Series: GIT Pull Requests Best Practices
Singsys Pte Ltd
 
Lab3 RTC Source Control
Lab3 RTC Source ControlLab3 RTC Source Control
Lab3 RTC Source Control
IBM Rational software
 
Application of Git Revert in different situation
Application of Git Revert in different situationApplication of Git Revert in different situation
Application of Git Revert in different situation
Shobhakar Tiwari
 
Git 101 - An introduction to Version Control using Git
Git 101 - An introduction to Version Control using Git Git 101 - An introduction to Version Control using Git
Git 101 - An introduction to Version Control using Git
John Tighe
 
Git Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebase
Git Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebaseGit Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebase
Git Tutorial EclipseCon France 2014 - Git Exercise 06 - interactive rebase
msohn
 
Git Branching and Merging.pptx
Git Branching and Merging.pptxGit Branching and Merging.pptx
Git Branching and Merging.pptx
tapanvyas11
 
The benefits of using Git
The benefits of using GitThe benefits of using Git
The benefits of using Git
Yannick Warnier
 
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review changeGit Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
Git Tutorial EclipseCon France 2014 - Gerrit Exercise 4 - review change
msohn
 
Chicago alm user group git demo script and notes
Chicago alm user group   git demo script and notesChicago alm user group   git demo script and notes
Chicago alm user group git demo script and notes
Dave Burnison
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
mobaires
 
Mastering Git Worktree - Enhancing Your Version Control Workflow
Mastering Git Worktree - Enhancing Your Version Control WorkflowMastering Git Worktree - Enhancing Your Version Control Workflow
Mastering Git Worktree - Enhancing Your Version Control Workflow
Jignesh Boricha
 
Developing with versioning and CI/CD
Developing with versioning and CI/CDDeveloping with versioning and CI/CD
Developing with versioning and CI/CD
Matteo Di Carlo
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
Sebin Benjamin
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
King Hom
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
James Ford
 
Technical Seminar Series: GIT Pull Requests Best Practices
Technical Seminar Series:  GIT Pull Requests Best PracticesTechnical Seminar Series:  GIT Pull Requests Best Practices
Technical Seminar Series: GIT Pull Requests Best Practices
Singsys Pte Ltd
 
Application of Git Revert in different situation
Application of Git Revert in different situationApplication of Git Revert in different situation
Application of Git Revert in different situation
Shobhakar Tiwari
 
Git 101 - An introduction to Version Control using Git
Git 101 - An introduction to Version Control using Git Git 101 - An introduction to Version Control using Git
Git 101 - An introduction to Version Control using Git
John Tighe
 

More from msohn (20)

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

Recently uploaded (20)

How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Ad

Git Tutorial EclipseCon France 2014 - Git Exercise 03 - work on branches in parallel

  • 1. Work on branches in parallel In this exercise you learn how you can efficiently work in different branches in parallel. A common situation is that you want to switch to another branch and you want to temporarily save your work on the current branch. You will learn two possibilities: ● Amend: Commit an unfinished change and replace this commit later with a new, refined commit using the amend feature of git. ● Stash: Put your change into the git stash area with the stash command Preparation Follow exercise 2, “Develop a feature/bug fix” to create a commit on a feature branch based on the remote tracking branch origin/master. Start working on another feature ● Create a new local branch based on the remote tracking branch “origin/master” ● You may create the new branch from the History View : ○ Select the project, then click Show In > History (Some views, e.g. in the Java EE-Perspective, do not have this shortcut, in this case use Team > Show in History) ○ In the history view click all toggle buttons as shown in the screenshot (“Link with Editor and Selection”, “Show all changes in Repository”, “Compare Mode”, “Show all branches”)
  • 2. ○ Click “Create Branch...” on the commit where“origin/master” points to
  • 3. ● Or you may do that from the Repositories View : select the remote tracking branch origin/master and click Create Branch ● Enter “addMultiplyOperation” as the name of the new branch, make sure the “Checkout new branch” is selected and click Finish ● Check that now you don’t see the changes of the first exercise anymore in your workspace. ● Start working on a change, e.g. add a MultiplyOperation, do not commit yet, first read on. Save your work temporarily Now you want to switch to another branch but you want to continue working at your new feature later on. There are two ways to achieve that: doing a preliminary commit and use amend later to continue your work or use stash. You may do this exercise twice to try both ways. Preliminary Commit The easiest thing to do is to just commit your work in progress and amend that commit later to replace the preliminary commit. ● Open the Git Staging View ● Enter a preliminary message, e.g. “WIP ...” for Work in Progress, stage the files to be committed and click on Commit
  • 4. Stash Select Stash Changes on the repository node in the Git Repositories View. As a result you will get a new node in the view. It contains a list of all the stashed changes. The label contains the current branch, the id and the commit message of the current commit. Note that untracked files are not stashed by default. If you are using at least EGit 3.4 you can include untracked files by checking the corresponding option. In older versions you have to drag and drop an untracked file to the “Staged Changes” area before you can stash it. Switch to another branch ● Now you can switch to the first feature branch “addDivideOperation”, either by double clicking on the branch node in the Git Repositories View, by selecting “Team > Switch to > addDivideOperation” or by clicking “Checkout” in the History View. ● Check that your workspace contains the changes you committed in your first feature (implementing divide) branch. You could now continue working here. For example: you may want to fix the division by zero issue if it is not already handled. If you do any changes in the “addDivideOperation” branch don’t forget to commit them before the next step
  • 5. ● Switch back to the “addMultiplyOperation” branch Continue working on the branch to add Multiply Case 1: Preliminary Commit ● Do another change in the workspace improving Multiply. ● Compare your changed project with the first, preliminary commit by selecting Compare With > HEAD revision. This will show you the changes you will add on top of the first commit. ● Compare your changed project with the parent commit of your first, preliminary commit by selecting Compare With > Previous revision. This will show you the changes you will have in your new commit after the next step. Create a new commit with the combined changes of your first, preliminary commit and your current changes ● Open the Git Staging View ● Click the “Amend” button as shown below. ● Now you see again the commit message of the last commit you made in this branch. Change it to something meaningful, stage the change and click the Commit button. ● In the History View you can now see that your first, preliminary commit was replaced by the new one.
  • 6. Case 2: Stash ● In the Repositories View, select Apply Stashed Changes on the stash entry. ● Note that you can apply the stashed change on any commit in your repository. This is useful if you have started on a branch but you realize that you would like to continue on another branch. If you apply the stashed commit on another base version this may lead to conflicts you may have to resolve in this case. Copyright © 2014 by C. Halstrick, E. Kempin, S. Lay, S. Zivkov, M. Sohn