Download - Ditributed Version Control System
![Page 1: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/1.jpg)
![Page 2: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/2.jpg)
Apr 10, 2023 www.ambientia.net 2
DVCS
Distributed version control (systems)
![Page 3: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/3.jpg)
Apr 10, 2023 www.ambientia.net 3
What is DVCS?
Distributed revision control system
or
Distributed version control system
or
Decentralized version control system
or, simply
the greatest thing since sliced bread?
![Page 4: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/4.jpg)
Apr 10, 2023 www.ambientia.net 4
What is Version Control?
• Belongs to Software Configuration Management• Management of changes (over time) to
• Documents• Source code• Web sites (and any other collections of information)
file a
file b
file c
1.0 2.0 2.1 3.0
![Page 5: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/5.jpg)
Apr 10, 2023 www.ambientia.net 5
Traditional VCS
• Centralized• Client-server approach• Single point of failure• Most operations require
network connection• Support for locking
resources
Server
Client
Client
Client
Client
Client
Client
Client
![Page 6: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/6.jpg)
Apr 10, 2023 www.ambientia.net 6
DVCS
• Peer-to-peer, based on the exchange of patches
• Collaboration without common network
• Every working copy is a standalone repository
Client
Client
Client
Client
Client
Client
Client
Client
Client
Client
Client
Client
Client
CI QA Rel.
![Page 7: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/7.jpg)
Apr 10, 2023 www.ambientia.net 7
Basic ConceptsJim Jill
A
repository
Clone A2
repositoryclone
commitchanges
pull
push
![Page 8: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/8.jpg)
Apr 10, 2023 www.ambientia.net 8
TermsRepository A container of assets, e.g. source code. Commonly a directory in a filesystem
containingspecial meta-data about the repository contents (.git and .hg directories).
Working directory The repository contents editable in the filesystem.
Commit, changeset A change applied to the repository contents (multiple files at one) within a transaction.Given a unique identified (a hash code).
Patch A set of commits (one or more) transferred between repositories.
Clone A full copy of another (upstream) repository. The initial copying operation of a repositoryinto another is called cloning.
Push Making changesets from the local repository (source) available in another (destination).
Pull Making changesets from an external repository available locally.
![Page 9: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/9.jpg)
Apr 10, 2023 9www.ambientia.net
Benefits of DVCS
![Page 10: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/10.jpg)
Apr 10, 2023 www.ambientia.net 10
Independence
Bekathwia
Marysol*
Work can progress even when disconnected from the network
![Page 11: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/11.jpg)
Apr 10, 2023 www.ambientia.net 11
Speed
Martin Heigan
Most commonly used operations are extremely fast
![Page 12: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/12.jpg)
Apr 10, 2023 www.ambientia.net 12
Safety
Myrrien
Every working copy is a full backup of the project repository
markjhandel
![Page 13: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/13.jpg)
Apr 10, 2023 www.ambientia.net 13
Flexibility
madprime
Working model is up to the project team
Paul L Dineen
![Page 14: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/14.jpg)
Apr 10, 2023 www.ambientia.net 14
Isolation
ttcopley
Work on new, great ideas now, share the results later
appel
![Page 15: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/15.jpg)
Apr 10, 2023 www.ambientia.net 15
Disadvantages
• Cloning retrieves everything• Uses a lot of bandwidth on the first clone• Might use a lot of disk space as well• Problematic for non-mergeable content
• No support for locking• Locking can be useful for non-mergeable content
• Non-mergeable content?• For example, graphics assets, i.e. large binary files• Always stored in full, for every change
![Page 16: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/16.jpg)
Apr 10, 2023 www.ambientia.net 16
Everything is a Branch
• Working copies• Named branches
• Release branches• Deployment targets
• Light-weight branches• Feature branches• Bug fix branches• Exploratory branches
• Multiple heads in a repository (Mercurial)
FeatheredTar
![Page 17: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/17.jpg)
Apr 10, 2023 www.ambientia.net 17
Branching Model
• Everybody should know:• When to branch; where to
branch from• When to merge; where to
merge back to
• Tailor the model for your environment• Heavy vs. light
• Common model• Git Flow http://nvie.com/posts/a-successful-git-branching-model/
![Page 18: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/18.jpg)
Apr 10, 2023 18www.ambientia.net
Feature Branching
![Page 19: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/19.jpg)
Apr 10, 2023 www.ambientia.net 19
Feature Branching Timeline
feat-X
develop
Pull request
fork
merge changes
merge and remove branch
![Page 20: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/20.jpg)
Apr 10, 2023 www.ambientia.net 20
Steps for Feature Branching
1. Fork a new branch for each individual change
2. Work on and test the branch in isolation
3. Pull changes from the mother branch continuously (keep up-to-date with others)
4. When ready, publish the changes by creating a pull request• Let others review the pull request for quality control
5. Merge the accepted pull request back to the upstream branch (mother branch)
6. Get rid of the (short-lived) feature branch
![Page 21: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/21.jpg)
Apr 10, 2023 www.ambientia.net 21
Pull requests
• Clear point for reviews and quality control• Checklists, formal reviews, performance testing
• Final merge can be done by an integrator (role)• Multiple features/fixes developed in parallel
• Efficiency
• Isolation until final merge• Mainline can maintain high level of quality at all times• No need to delay work due to release preparation• Release from mainline at will
![Page 22: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/22.jpg)
Atlassian Feature Branching
Atlassian DVCS and development flow
![Page 23: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/23.jpg)
Apr 10, 2023 www.ambientia.net 23
Atlassian DVCS support
• JIRA• Feature branch creation for issues
• Stash• Git repository management• Pull requests
• SourceTree• Free (!) repository browser
• Bamboo• Continuous integration• Continuous releasing and/or
deployment
JIRA
SourceTree
Stash
Bamboo
IDE / Editor
![Page 24: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/24.jpg)
www.ambientia.net 24
Branching from JIRA
14.11.2013
![Page 25: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/25.jpg)
www.ambientia.net 25
Checkout from Stash
14.11.2013
![Page 26: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/26.jpg)
Apr 10, 2023 www.ambientia.net 26
SourceTree on developer’s computer
![Page 27: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/27.jpg)
Apr 10, 2023 www.ambientia.net 27
Bamboo branch autodetection, ci
![Page 28: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/28.jpg)
Apr 10, 2023 www.ambientia.net 28
Pull request from SourceTree
![Page 29: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/29.jpg)
www.ambientia.net 29
Code reviews by pull requests
14.11.2013
![Page 30: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/30.jpg)
www.ambientia.net 30
Merging the pull request
14.11.2013
![Page 31: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/31.jpg)
Images Creative Commons-licensed for commercial use
http://creativecommons.org/licenses/by-sa/2.0/legalcode
(The image owners’ Flickr URL attached to each image as a hyperlink)
Images from Flickr
Apr 10, 2023www.ambientia.net 31
Screenshots from Atlassian
![Page 32: Ditributed Version Control System](https://reader033.vdocuments.site/reader033/viewer/2022061218/54b72f9c4a795903318b46c2/html5/thumbnails/32.jpg)
+358 40 749 2051
@tomi_kallio
Tomi Kallio
Apr 10, 2023www.ambientia.net 32