SlideShare a Scribd company logo
1 of 26
Version Control Introduction for FLL Teams
Using EV3Hub
Why
Version
Control?
1. Collaboration, especially for teams that are
working in different locations
2. Complete, long term change history useful for
backups and understanding what happened
• Traceability, finding what happened in the past with
complex projects is not easy
3. Branching and merging- needed for teams
working together (but also useful for individuals)
4. Because the pros do it! (and, we are teaching FLL
students to use best practices)
What do the
professionals
use?
Basic Intro to Version
Control Concepts
Part 1
A good VCS
does the
following:
Backup and Restore. Files are saved as they are edited, and you can jump to any
moment in time.
Synchronization. Lets people share files and stay up-to-date with the latest
version.
Short-term undo. Monkeying with a file and messed it up? Throw away your
changes and go back to the “last known good” version in the database.
Long-term undo. Sometimes we mess up bad. Suppose you made a change a
year ago, ump back to the old version, and see what change was made that day.
Track Changes. As files are updated, you can leave messages explaining why the
change happened This makes it easy to see how things change over time
Track Ownership. A VCS tags every change with the name of the person who
made it. Helpful for blamestorming giving credit.
Sandboxing, or insurance against yourself. Making a big change? You can make
temporary changes in an isolated area before “checking in” your changes.
Branching and merging. A larger sandbox. You can branch a copy of your code
into a separate area and modify it in isolation (tracking changes separately
https://betterexplained.com/articles/a-visual-guide-to-version-control/
Basic Version
Control Setup
• Repository (repo): The database storing the files.
• Server: The computer storing the repo.
• Client: The computer connecting to the repo.
• Working Set/Working Copy: Your local directory of files,
where you make changes.
• Trunk/Main: The primary location for code in the repo.
Think of code as a family tree — the trunk is the main
line.
https://betterexplained.com/articles/a-visual-guide-to-version-control/
Basic VCS
Actions
• Add: Put a file into the repo for the first time, i.e. begin tracking it with
Version Control.
• Revision: What version a file is on (v1, v2, v3, etc.).
• Head: The latest revision in the repo.
• Check out: Download a file from the repo.
• Check in: Upload a file to the repository (if it has changed). The file gets
a new revision number, and people can “check out” the latest one.
• Checkin Message: A short message describing what was changed.
• Changelog/History: A list of changes made to a file since it was created.
• Update/Sync: Synchronize your files with the latest from the
repository. This lets you grab the latest revisions of all files.
• Revert: Throw away your local changes and reload the latest version
from the repository.
https://betterexplained.com/articles/a-visual-guide-to-version-control/
Advanced VCS
Actions
• Branch: Create a separate copy of a file/folder for private use (bug fixing, testing, etc).
Branch is both a verb (“branch the code”) and a noun (“Which branch is it in?”).
• Diff/Change/Delta: Finding the differences between two files. Useful for seeing what
changed between revisions.
• Merge (or patch): Apply the changes from one file to another, to bring it up-to-date.
For example, you can merge features from one branch into another. (At Microsoft this
was called Reverse Integrate and Forward Integrate)
• Conflict: When pending changes to a file contradict each other (both changes cannot
be applied).
• Resolve: Fixing the changes that contradict each other and checking in the correct
version.
• Locking: Taking control of a file so nobody else can edit it until you unlock it. Some
version control systems use this to avoid conflicts.
• Breaking the lock: Forcibly unlocking a file so you can edit it. It may be needed if
someone locks a file and goes on vacation (or “calls in sick” the day Halo 3 comes out).
• Check out for edit: Checking out an “editable” version of a file. Some VCSes have
editable files by default, others require an explicit command.
https://betterexplained.com/articles/a-visual-guide-to-version-control/
https://betterexplained.com/articles/a-visual-guide-to-version-control/
If you don’t like your changes and
want to start over, you can revert to
the previous version and start again
(or stop).
When checking out, you get the latest
revision by default. If you want, you
can specify a particular revision.
https://betterexplained.com/articles/a-visual-guide-to-version-control/
Diffs help us notice changes (“How did
you fix that bug again?”) and even
apply them from one branch to
another.
Bonus question: what’s the diff from r1
to r4?
https://betterexplained.com/articles/a-visual-guide-to-version-control/
https://betterexplained.com/articles/a-visual-guide-to-version-control/
If we diffed r6 and r7, we would lose
the “Bread” feature that was in main.
This is a subtle point — imagine
“peeling off” the changes from the
experimental branch (+Rice) and
adding that to main. Main may have
had other changes, which is ok — we
just want to insert the Rice feature.
Note: in EV3Hub, merging
will usually happen on a
single Trunk, and occur
when several students edit
the same file
https://betterexplained.com/articles/a-visual-guide-to-version-control/
https://betterexplained.com/articles/a-visual-guide-to-version-control/
A few approaches:
1. Re-apply your changes. Sync to
the the latest version (r4) and re-
apply your changes to this file:
Add hot dog to the list that
already has cheese.
2. Override their changes with
yours. Check out the latest
version (r4), copy over your
version, and check your version
in. In effect, this removes cheese
and replaces it with hot dog.
Conflicts are infrequent but can be a
pain.
At this point it’s a race: if Joe checks in
first, that’s the change that goes
through (and Sue can’t make her
change).
When changes overlap and contradict
like this, the VCS may report a conflict
and not let you check in — it’s up to
you to check in a newer version that
resolves this dilemma.
https://betterexplained.com/articles/a-visual-guide-to-version-control/
Basics of EV3Hub
Version Control
Part 2
An account may have
multiple Projects – no
merging across projects
A single login account per
FLL team
Built in Viewer for
differences (“diffs”)
Help!
Use these fields!!! …SO
important to trace history
of actions

Head
Current
ID
Old
ID
Explain This To Me!
Auto-merge feature – be aware!
Auto-merge feature – be aware!
Show What is the Same
Tagging – Use for Major Commits
Hands On Part 3
Training
Actions
(Instructor
Hints in Notes)
1. Students: open the EV3 project file, edit only your
Program
2. Instructor: choose two Students to Commit
changes
3. Students: anticipate and observe any Merge
Errors, why?
4. Instructor: ask all Students to Commit changes
5. Students: any Manual Merges? Any Auto
Merges? Why?
6. Instructor: ask Student with oldest timestamp to
edit a MyBlock
7. Instructor: ask Student to Commit changes. (see
notes)
Rules for 31250 Part 4
Version
Control
Rules We
Follow
(31250)
1. Always download most recent Head, BEFORE you begin to
make your changes
2. Always type your name in the “Who Made This Change”
box during Commit
3. If you see an Auto-Merge event, perform a Diff and notify
the Student who’s changes were merged (eg; Program +
Version ID + Who)
4. If you are prompted for a Manual Merge, only select
Programs you *know* you’ve edited, for all other
Programs, keep Head as the master
(if you notice a conflict with another Student, ask that
Student about the changes they’ve made)
5. Notify a coach immediately if you suspect any check-in /
check-out issues.

More Related Content

What's hot

Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementIntroduction to Version Control and Configuration Management
Introduction to Version Control and Configuration Management
Philip Johnson
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project Hosting
Philip Johnson
 
Subversion client
Subversion clientSubversion client
Subversion client
rchakra
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overview
polarion
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
abackstrom
 

What's hot (20)

How to use CVS applied to SOLab
How to use CVS applied to SOLabHow to use CVS applied to SOLab
How to use CVS applied to SOLab
 
Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementIntroduction to Version Control and Configuration Management
Introduction to Version Control and Configuration Management
 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project Hosting
 
Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopi
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
Subversion client
Subversion clientSubversion client
Subversion client
 
Using svn
Using svnUsing svn
Using svn
 
Subversion Best Practices
Subversion Best PracticesSubversion Best Practices
Subversion Best Practices
 
Svn tutorial
Svn tutorialSvn tutorial
Svn tutorial
 
Nguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesNguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practices
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to Subversion
 
Subversion workshop
Subversion workshopSubversion workshop
Subversion workshop
 
Subversion
SubversionSubversion
Subversion
 
Part 4 - Managing your svn repository using jas forge
Part 4  - Managing your svn repository using jas forgePart 4  - Managing your svn repository using jas forge
Part 4 - Managing your svn repository using jas forge
 
Getting Started With Subversion
Getting Started With SubversionGetting Started With Subversion
Getting Started With Subversion
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overview
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
svn
svnsvn
svn
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 

Similar to Version Control Training - First Lego League

Slide set 7 (Source Code Management History Overview) - Copy.pptx
Slide set 7 (Source Code Management History  Overview) - Copy.pptxSlide set 7 (Source Code Management History  Overview) - Copy.pptx
Slide set 7 (Source Code Management History Overview) - Copy.pptx
UTKARSHBHARDWAJ71
 
Module 3: Working with Jazz Source Control
Module 3: Working with Jazz Source ControlModule 3: Working with Jazz Source Control
Module 3: Working with Jazz Source Control
IBM Rational software
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP Developers
Lorna Mitchell
 
Subversion
SubversionSubversion
Subversion
thebdot1
 
Subversion
SubversionSubversion
Subversion
rchakra
 
Version control with Subversion
Version control with SubversionVersion control with Subversion
Version control with Subversion
O. R. Kumaran
 

Similar to Version Control Training - First Lego League (20)

SVN Information
SVN Information  SVN Information
SVN Information
 
Slide set 7 (Source Code Management History Overview) - Copy.pptx
Slide set 7 (Source Code Management History  Overview) - Copy.pptxSlide set 7 (Source Code Management History  Overview) - Copy.pptx
Slide set 7 (Source Code Management History Overview) - Copy.pptx
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Subversion
SubversionSubversion
Subversion
 
Source Code Management Slides
Source Code Management SlidesSource Code Management Slides
Source Code Management Slides
 
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version Control
 
Module 3: Working with Jazz Source Control
Module 3: Working with Jazz Source ControlModule 3: Working with Jazz Source Control
Module 3: Working with Jazz Source Control
 
Burlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion PresentationBurlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion Presentation
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP Developers
 
Svn workflow
Svn workflowSvn workflow
Svn workflow
 
Subversion
SubversionSubversion
Subversion
 
Subversion
SubversionSubversion
Subversion
 
version control system (2).pptx
version control system (2).pptxversion control system (2).pptx
version control system (2).pptx
 
Version Control
Version ControlVersion Control
Version Control
 
Git your life for fun & profit
Git your life for fun & profitGit your life for fun & profit
Git your life for fun & profit
 
Mercurial presentation
Mercurial presentationMercurial presentation
Mercurial presentation
 
Version control with Subversion
Version control with SubversionVersion control with Subversion
Version control with Subversion
 
Svn tutorial
Svn tutorialSvn tutorial
Svn tutorial
 
Drupal Version Control & File System Basics
Drupal Version Control & File System BasicsDrupal Version Control & File System Basics
Drupal Version Control & File System Basics
 

More from Jeffrey T. Pollock

Data Mesh Part 4 Monolith to Mesh
Data Mesh Part 4 Monolith to MeshData Mesh Part 4 Monolith to Mesh
Data Mesh Part 4 Monolith to Mesh
Jeffrey T. Pollock
 
Webinar future dataintegration-datamesh-and-goldengatekafka
Webinar future dataintegration-datamesh-and-goldengatekafkaWebinar future dataintegration-datamesh-and-goldengatekafka
Webinar future dataintegration-datamesh-and-goldengatekafka
Jeffrey T. Pollock
 

More from Jeffrey T. Pollock (20)

2017 OpenWorld Keynote for Data Integration
2017 OpenWorld Keynote for Data Integration2017 OpenWorld Keynote for Data Integration
2017 OpenWorld Keynote for Data Integration
 
Data Mesh Part 4 Monolith to Mesh
Data Mesh Part 4 Monolith to MeshData Mesh Part 4 Monolith to Mesh
Data Mesh Part 4 Monolith to Mesh
 
Webinar Data Mesh - Part 3
Webinar Data Mesh - Part 3Webinar Data Mesh - Part 3
Webinar Data Mesh - Part 3
 
Microservices Patterns with GoldenGate
Microservices Patterns with GoldenGateMicroservices Patterns with GoldenGate
Microservices Patterns with GoldenGate
 
Webinar future dataintegration-datamesh-and-goldengatekafka
Webinar future dataintegration-datamesh-and-goldengatekafkaWebinar future dataintegration-datamesh-and-goldengatekafka
Webinar future dataintegration-datamesh-and-goldengatekafka
 
Flash session -streaming--ses1243-lon
Flash session -streaming--ses1243-lonFlash session -streaming--ses1243-lon
Flash session -streaming--ses1243-lon
 
Flash session -goldengate--lht1053-lon
Flash session -goldengate--lht1053-lonFlash session -goldengate--lht1053-lon
Flash session -goldengate--lht1053-lon
 
Oracle Stream Analytics - Developer Introduction
Oracle Stream Analytics - Developer IntroductionOracle Stream Analytics - Developer Introduction
Oracle Stream Analytics - Developer Introduction
 
GoldenGate and Stream Processing with Special Guest Rakuten
GoldenGate and Stream Processing with Special Guest RakutenGoldenGate and Stream Processing with Special Guest Rakuten
GoldenGate and Stream Processing with Special Guest Rakuten
 
Stream based Data Integration
Stream based Data IntegrationStream based Data Integration
Stream based Data Integration
 
Intelligent Integration OOW2017 - Jeff Pollock
Intelligent Integration OOW2017 - Jeff PollockIntelligent Integration OOW2017 - Jeff Pollock
Intelligent Integration OOW2017 - Jeff Pollock
 
Oracle Data Integration - Overview
Oracle Data Integration - OverviewOracle Data Integration - Overview
Oracle Data Integration - Overview
 
Oracle Data Integration CON9737 at OpenWorld
Oracle Data Integration CON9737 at OpenWorldOracle Data Integration CON9737 at OpenWorld
Oracle Data Integration CON9737 at OpenWorld
 
CDO - Chief Data Officer Momentum and Trends
CDO - Chief Data Officer Momentum and TrendsCDO - Chief Data Officer Momentum and Trends
CDO - Chief Data Officer Momentum and Trends
 
Big Data at Oracle - Strata 2015 San Jose
Big Data at Oracle - Strata 2015 San JoseBig Data at Oracle - Strata 2015 San Jose
Big Data at Oracle - Strata 2015 San Jose
 
One Slide Overview: ORCL Big Data Integration and Governance
One Slide Overview: ORCL Big Data Integration and GovernanceOne Slide Overview: ORCL Big Data Integration and Governance
One Slide Overview: ORCL Big Data Integration and Governance
 
Oracle Big Data Governance Webcast Charts
Oracle Big Data Governance Webcast ChartsOracle Big Data Governance Webcast Charts
Oracle Big Data Governance Webcast Charts
 
Unlocking Big Data Silos in the Enterprise or the Cloud (Con7877)
Unlocking Big Data Silos in the Enterprise or the Cloud (Con7877)Unlocking Big Data Silos in the Enterprise or the Cloud (Con7877)
Unlocking Big Data Silos in the Enterprise or the Cloud (Con7877)
 
Tapping into the Big Data Reservoir (CON7934)
Tapping into the Big Data Reservoir (CON7934)Tapping into the Big Data Reservoir (CON7934)
Tapping into the Big Data Reservoir (CON7934)
 
Brief lessons from the greatest product managers
Brief lessons from the greatest product managersBrief lessons from the greatest product managers
Brief lessons from the greatest product managers
 

Recently uploaded

MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
Krashi Coaching
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 

Recently uploaded (20)

HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptxHVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
Software testing for project report .pdf
Software testing for project report .pdfSoftware testing for project report .pdf
Software testing for project report .pdf
 
IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.
 
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptxREPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 

Version Control Training - First Lego League

  • 1. Version Control Introduction for FLL Teams Using EV3Hub
  • 2. Why Version Control? 1. Collaboration, especially for teams that are working in different locations 2. Complete, long term change history useful for backups and understanding what happened • Traceability, finding what happened in the past with complex projects is not easy 3. Branching and merging- needed for teams working together (but also useful for individuals) 4. Because the pros do it! (and, we are teaching FLL students to use best practices)
  • 4. Basic Intro to Version Control Concepts Part 1
  • 5. A good VCS does the following: Backup and Restore. Files are saved as they are edited, and you can jump to any moment in time. Synchronization. Lets people share files and stay up-to-date with the latest version. Short-term undo. Monkeying with a file and messed it up? Throw away your changes and go back to the “last known good” version in the database. Long-term undo. Sometimes we mess up bad. Suppose you made a change a year ago, ump back to the old version, and see what change was made that day. Track Changes. As files are updated, you can leave messages explaining why the change happened This makes it easy to see how things change over time Track Ownership. A VCS tags every change with the name of the person who made it. Helpful for blamestorming giving credit. Sandboxing, or insurance against yourself. Making a big change? You can make temporary changes in an isolated area before “checking in” your changes. Branching and merging. A larger sandbox. You can branch a copy of your code into a separate area and modify it in isolation (tracking changes separately https://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 6. Basic Version Control Setup • Repository (repo): The database storing the files. • Server: The computer storing the repo. • Client: The computer connecting to the repo. • Working Set/Working Copy: Your local directory of files, where you make changes. • Trunk/Main: The primary location for code in the repo. Think of code as a family tree — the trunk is the main line. https://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 7. Basic VCS Actions • Add: Put a file into the repo for the first time, i.e. begin tracking it with Version Control. • Revision: What version a file is on (v1, v2, v3, etc.). • Head: The latest revision in the repo. • Check out: Download a file from the repo. • Check in: Upload a file to the repository (if it has changed). The file gets a new revision number, and people can “check out” the latest one. • Checkin Message: A short message describing what was changed. • Changelog/History: A list of changes made to a file since it was created. • Update/Sync: Synchronize your files with the latest from the repository. This lets you grab the latest revisions of all files. • Revert: Throw away your local changes and reload the latest version from the repository. https://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 8. Advanced VCS Actions • Branch: Create a separate copy of a file/folder for private use (bug fixing, testing, etc). Branch is both a verb (“branch the code”) and a noun (“Which branch is it in?”). • Diff/Change/Delta: Finding the differences between two files. Useful for seeing what changed between revisions. • Merge (or patch): Apply the changes from one file to another, to bring it up-to-date. For example, you can merge features from one branch into another. (At Microsoft this was called Reverse Integrate and Forward Integrate) • Conflict: When pending changes to a file contradict each other (both changes cannot be applied). • Resolve: Fixing the changes that contradict each other and checking in the correct version. • Locking: Taking control of a file so nobody else can edit it until you unlock it. Some version control systems use this to avoid conflicts. • Breaking the lock: Forcibly unlocking a file so you can edit it. It may be needed if someone locks a file and goes on vacation (or “calls in sick” the day Halo 3 comes out). • Check out for edit: Checking out an “editable” version of a file. Some VCSes have editable files by default, others require an explicit command. https://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 10. If you don’t like your changes and want to start over, you can revert to the previous version and start again (or stop). When checking out, you get the latest revision by default. If you want, you can specify a particular revision. https://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 11. Diffs help us notice changes (“How did you fix that bug again?”) and even apply them from one branch to another. Bonus question: what’s the diff from r1 to r4? https://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 13. If we diffed r6 and r7, we would lose the “Bread” feature that was in main. This is a subtle point — imagine “peeling off” the changes from the experimental branch (+Rice) and adding that to main. Main may have had other changes, which is ok — we just want to insert the Rice feature. Note: in EV3Hub, merging will usually happen on a single Trunk, and occur when several students edit the same file https://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 15. A few approaches: 1. Re-apply your changes. Sync to the the latest version (r4) and re- apply your changes to this file: Add hot dog to the list that already has cheese. 2. Override their changes with yours. Check out the latest version (r4), copy over your version, and check your version in. In effect, this removes cheese and replaces it with hot dog. Conflicts are infrequent but can be a pain. At this point it’s a race: if Joe checks in first, that’s the change that goes through (and Sue can’t make her change). When changes overlap and contradict like this, the VCS may report a conflict and not let you check in — it’s up to you to check in a newer version that resolves this dilemma. https://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 16. Basics of EV3Hub Version Control Part 2
  • 17. An account may have multiple Projects – no merging across projects A single login account per FLL team Built in Viewer for differences (“diffs”) Help! Use these fields!!! …SO important to trace history of actions  Head Current ID Old ID
  • 21. Show What is the Same
  • 22. Tagging – Use for Major Commits
  • 24. Training Actions (Instructor Hints in Notes) 1. Students: open the EV3 project file, edit only your Program 2. Instructor: choose two Students to Commit changes 3. Students: anticipate and observe any Merge Errors, why? 4. Instructor: ask all Students to Commit changes 5. Students: any Manual Merges? Any Auto Merges? Why? 6. Instructor: ask Student with oldest timestamp to edit a MyBlock 7. Instructor: ask Student to Commit changes. (see notes)
  • 25. Rules for 31250 Part 4
  • 26. Version Control Rules We Follow (31250) 1. Always download most recent Head, BEFORE you begin to make your changes 2. Always type your name in the “Who Made This Change” box during Commit 3. If you see an Auto-Merge event, perform a Diff and notify the Student who’s changes were merged (eg; Program + Version ID + Who) 4. If you are prompted for a Manual Merge, only select Programs you *know* you’ve edited, for all other Programs, keep Head as the master (if you notice a conflict with another Student, ask that Student about the changes they’ve made) 5. Notify a coach immediately if you suspect any check-in / check-out issues.

Editor's Notes

  1. Notes: Everyone did download at same time Sequential commits should produce errors as the versions get out of sync EV3Hub usually does “auto-merge” … use this to show students how the Diff feature works, let them see what is different and the same. Did EV3 merge correctly? Will it always? Should they verify? (Yes!) When you get to the step of asking Student to edit a MyBlock… look for student with the oldest timestamp (for this training period) and ask them to edit. Instructor is looking to see if the student does a fresh download before editing. If they do download, praise them and talk about why, and what would happen if they didn’t. You can choose to force a merge error by asking a different student to edit and having them purposefully skip the download step. If the student does not download, allow them to proceed and see the error.
  2. Notes: Everyone did download at same time Sequential commits should produce errors as the versions get out of sync EV3Hub usually does “auto-merge” … use this to show students how the Diff feature works, let them see what is different and the same. Did EV3 merge correctly? Will it always? Should they verify? (Yes!) When you get to the step of asking Student to edit a MyBlock… look for student with the oldest timestamp (for this training period) and ask them to edit. Instructor is looking to see if the student does a fresh download before editing. If they do download, praise them and talk about why, and what would happen if they didn’t. You can choose to force a merge error by asking a different student to edit and having them purposefully skip the download step. If the student does not download, allow them to proceed and see the error.
  3. Notes: Everyone did download at same time Sequential commits should produce errors as the versions get out of sync EV3Hub usually does “auto-merge” … use this to show students how the Diff feature works, let them see what is different and the same. Did EV3 merge correctly? Will it always? Should they verify? (Yes!) When you get to the step of asking Student to edit a MyBlock… look for student with the oldest timestamp (for this training period) and ask them to edit. Instructor is looking to see if the student does a fresh download before editing. If they do download, praise them and talk about why, and what would happen if they didn’t. You can choose to force a merge error by asking a different student to edit and having them purposefully skip the download step. If the student does not download, allow them to proceed and see the error.
  4. Notes: Everyone did download at same time Sequential commits should produce errors as the versions get out of sync EV3Hub usually does “auto-merge” … use this to show students how the Diff feature works, let them see what is different and the same. Did EV3 merge correctly? Will it always? Should they verify? (Yes!) When you get to the step of asking Student to edit a MyBlock… look for student with the oldest timestamp (for this training period) and ask them to edit. Instructor is looking to see if the student does a fresh download before editing. If they do download, praise them and talk about why, and what would happen if they didn’t. You can choose to force a merge error by asking a different student to edit and having them purposefully skip the download step. If the student does not download, allow them to proceed and see the error.