SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Getting Started with
      (Distributed) Version Control


     Because what other tools have a blame
                 command?


                 John Paulett
                  jhcore.com


April 3, 2009                                1
Collaboration
Bob adds foo() to main.c while Alice edits
bar() in main.c. How do they merge?



Please do not share code via Windows file
sharing!



April 3, 2009                                2
History
quot;Oops, we screwed up the release, can we
roll back to the last production version?quot;



“Who added this bug?”




April 3, 2009                                3
Backup
quot;The Photoshop keygen gave me a virus.quot;



Sharing files between computers




April 3, 2009                             4
Personally
Open source projects


Personal projects (master's thesis code)


School files (papers, assignments)


Config files (~/.ssh/config, ~/.hgrc)

April 3, 2009                              5
Centeralized vs Decentralized
Cathedral vs Bazaar


Offline commits
          More atomic commits
      ●




Forking is encouraged
          Can keep private until ready
      ●




                                     http://en.wikipedia.org/wiki/index.html?curid=755487
April 3, 2009                                                                      6
VCS Tools
     cp -R project project.old
 ●



     RCS
 ●



     CVS
 ●



     Subversion
 ●



     Perforce
 ●



     Visual SafeSource
 ●



     ClearCase
 ●



     ...
 ●

April 3, 2009                    7
Distributed VCS Tools
       Mercurial              Plastic SCM
   ●                      ●


       Git                    SVK
   ●                      ●


       Bazaar                 Codeville
   ●                      ●


       Monotone               GNU arch
   ●                      ●


       Darcs                  Bitkeeper
   ●                      ●



                              ...
                          ●




April 3, 2009                               8
Which one?
The new “vim vs emacs”




                             http://xkcd.com/378/


(emacs is better)
April 3, 2009                                       9
Mercurial
     OpenJDK
 ●



     Solaris
 ●



     Python
 ●



     Mozilla
 ●



     Netbeans
 ●




April 3, 2009               10
Workflow
 1. Checkout / Start repo
 2. Add / Remove / Edit files
 3. Commit your changes
 4. Push changes
 5. Update / Merge
 6. Go to #2



April 3, 2009                   11
Simple Example
# checkout the repository
hg clone http://bitbucket.org/johnpaulett/python-hl7/


# add the file server.py to be under version control
hg add server.py


# commit the file
hg commit -m quot;Added a single threaded HL7 socket
server.quot;



April 3, 2009                                          12
Simple Example
# Send my changes to bitbucket
hg push


# Pull others' changes from bitbucket
hg pull
hg update


# Merge in anyone else's changes
hg merge


April 3, 2009                           13
Useful Commands
Start a repository:
    hg init my-emr


Find out who changed what in which
version:
    hg blame
    hg log

April 3, 2009                        14
But I Hate the Command Line
TortoiseHg




April 3, 2009                     15
But I Hate the Command Line
MercurialEclipse




April 3, 2009                     16
Being a DVCS Dog
quot;On the Internet, nobody knows that you're
a dog.quot;


hgsubversion
git-svn




April 3, 2009                                   17
                                   New Yorker, 1993
Hosting
     BitBucket (or GitHub for git)
 ●



     Sourceforge
 ●




     hg serve
 ●



     SSH
 ●



     hgweb (via Apache)
 ●




April 3, 2009                        18
April 3, 2009   19
Bad Commit Messages
     Not Atomic
           “Fixed a few bugs in the interface.
           Added an ID field. Removed a couple
           unnecessary functions. Refactored the
           context check.”


     Not Specific
           “Fixed some bugs.”
http://lbrandy.com/blog/2009/03/writing-better-commit-messages/

April 3, 2009                                                     20
Customizing
hgrc
    Set locations, username, plugins



.hgignore
    Ignore unwanted files (*.class, *.pyc,
    *.log)

April 3, 2009                                21
More Info
    http://www.slideshare.net/johnpaulett/getting-started-with-
●

    distributed-version-control
    http://www.selenic.com/mercurial/wiki/
●


    http://betterexplained.com/articles/intro-to-distributed-version-
●

    control-illustrated/
    http://bitbucket.org/
●


    http://joshcarter.com/productivity/svn_hg_git_for_home_directory
●


    http://lbrandy.com/blog/2009/03/writing-better-commit-messages/
●


    http://bitbucket.org/mercurialeclipse/main/wiki/Home
●


    http://bitbucket.org/durin42/hgsubversion/wiki/Home
●


    http://bitbucket.org/tortoisehg/stable/wiki/Home
●




April 3, 2009                                                           22

Contenu connexe

Tendances

Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Asher Martin
 
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...Dexter Horthy
 
SELF 2014: PBI v10: Application Management Made Easy
SELF 2014: PBI v10: Application Management Made EasySELF 2014: PBI v10: Application Management Made Easy
SELF 2014: PBI v10: Application Management Made EasyKen Moore
 
Build service with_docker_in_90mins
Build service with_docker_in_90minsBuild service with_docker_in_90mins
Build service with_docker_in_90minsLarry Cai
 
Dependency Management with Composer
Dependency Management with ComposerDependency Management with Composer
Dependency Management with ComposerJordi Boggiano
 
DevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementDevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementFelipe
 
Deploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleDeploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleRoman Rodomansky
 
Usando docker en Azure
Usando docker en AzureUsando docker en Azure
Usando docker en AzureVíctor Moreno
 
Vagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersVagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersSagar Acharya
 
CloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngineCloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngineNick Anderson
 
Docker and plone
Docker and ploneDocker and plone
Docker and ploneAlin Voinea
 
Ruby Security the Hard Way
Ruby Security the Hard WayRuby Security the Hard Way
Ruby Security the Hard WayHiroshi SHIBATA
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsYoshiki Shibukawa
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionInstallation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionSammy Fung
 
How to configure an environment to cross-compile applications for beagleboard-xM
How to configure an environment to cross-compile applications for beagleboard-xMHow to configure an environment to cross-compile applications for beagleboard-xM
How to configure an environment to cross-compile applications for beagleboard-xMDalton Valadares
 
Symfony2 - A Short Introduction
Symfony2 - A Short IntroductionSymfony2 - A Short Introduction
Symfony2 - A Short IntroductionAndy Grunwald
 
Thrift+scribe实现分布式日志收集,并与log4j集成
Thrift+scribe实现分布式日志收集,并与log4j集成Thrift+scribe实现分布式日志收集,并与log4j集成
Thrift+scribe实现分布式日志收集,并与log4j集成zhongbing liu
 
Meetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioMeetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioUilian Ries
 

Tendances (20)

Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
 
SELF 2014: PBI v10: Application Management Made Easy
SELF 2014: PBI v10: Application Management Made EasySELF 2014: PBI v10: Application Management Made Easy
SELF 2014: PBI v10: Application Management Made Easy
 
Build service with_docker_in_90mins
Build service with_docker_in_90minsBuild service with_docker_in_90mins
Build service with_docker_in_90mins
 
Dependency Management with Composer
Dependency Management with ComposerDependency Management with Composer
Dependency Management with Composer
 
DevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementDevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration management
 
Deploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleDeploying Symfony2 app with Ansible
Deploying Symfony2 app with Ansible
 
Usando docker en Azure
Usando docker en AzureUsando docker en Azure
Usando docker en Azure
 
Vagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersVagrant step-by-step guide for Beginners
Vagrant step-by-step guide for Beginners
 
Smiley011
Smiley011Smiley011
Smiley011
 
CloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngineCloudOpen North America 2013: Vagrant & CFEngine
CloudOpen North America 2013: Vagrant & CFEngine
 
Docker and plone
Docker and ploneDocker and plone
Docker and plone
 
Ruby Security the Hard Way
Ruby Security the Hard WayRuby Security the Hard Way
Ruby Security the Hard Way
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and Errors
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionInstallation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server Edition
 
How to configure an environment to cross-compile applications for beagleboard-xM
How to configure an environment to cross-compile applications for beagleboard-xMHow to configure an environment to cross-compile applications for beagleboard-xM
How to configure an environment to cross-compile applications for beagleboard-xM
 
Symfony2 - A Short Introduction
Symfony2 - A Short IntroductionSymfony2 - A Short Introduction
Symfony2 - A Short Introduction
 
DevOps: Docker Workshop
DevOps: Docker WorkshopDevOps: Docker Workshop
DevOps: Docker Workshop
 
Thrift+scribe实现分布式日志收集,并与log4j集成
Thrift+scribe实现分布式日志收集,并与log4j集成Thrift+scribe实现分布式日志收集,并与log4j集成
Thrift+scribe实现分布式日志收集,并与log4j集成
 
Meetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioMeetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.io
 

Similaire à Getting Started with (Distributed) Version Control

Composer Power User Tips
Composer Power User TipsComposer Power User Tips
Composer Power User TipsTom Corrigan
 
Java IPC and the CLIP library
Java IPC and the CLIP libraryJava IPC and the CLIP library
Java IPC and the CLIP libraryltsllc
 
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp
 
Welcome to the Symfony2 World - FOSDEM 2013
 Welcome to the Symfony2 World - FOSDEM 2013 Welcome to the Symfony2 World - FOSDEM 2013
Welcome to the Symfony2 World - FOSDEM 2013Lukas Smith
 
DCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDocker, Inc.
 
Jordan Hubbard Talk @ LISA
Jordan Hubbard Talk @ LISAJordan Hubbard Talk @ LISA
Jordan Hubbard Talk @ LISAguest4c923d
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to androidOwen Hsu
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldRachael L Moore
 
A Continuous Packaging Pipeline
A Continuous Packaging PipelineA Continuous Packaging Pipeline
A Continuous Packaging PipelineMaciej Pasternacki
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in descriptionPrzemyslaw Koltermann
 
Why Mac Sysadmins Love Python
Why Mac Sysadmins Love PythonWhy Mac Sysadmins Love Python
Why Mac Sysadmins Love PythonTimothy Sutton
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool boxbpowell29a
 

Similaire à Getting Started with (Distributed) Version Control (20)

Intro To Git
Intro To GitIntro To Git
Intro To Git
 
Becoming Indie
Becoming IndieBecoming Indie
Becoming Indie
 
Composer Power User Tips
Composer Power User TipsComposer Power User Tips
Composer Power User Tips
 
Java IPC and the CLIP library
Java IPC and the CLIP libraryJava IPC and the CLIP library
Java IPC and the CLIP library
 
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
 
Welcome to the Symfony2 World - FOSDEM 2013
 Welcome to the Symfony2 World - FOSDEM 2013 Welcome to the Symfony2 World - FOSDEM 2013
Welcome to the Symfony2 World - FOSDEM 2013
 
DCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker Captains
 
Jordan Hubbard Talk @ LISA
Jordan Hubbard Talk @ LISAJordan Hubbard Talk @ LISA
Jordan Hubbard Talk @ LISA
 
Docker as an every day work tool
Docker as an every day work toolDocker as an every day work tool
Docker as an every day work tool
 
PostgreSQL Development Today: 9.0
PostgreSQL Development Today: 9.0PostgreSQL Development Today: 9.0
PostgreSQL Development Today: 9.0
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to android
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component world
 
A Continuous Packaging Pipeline
A Continuous Packaging PipelineA Continuous Packaging Pipeline
A Continuous Packaging Pipeline
 
Versions
VersionsVersions
Versions
 
Version Control for Mere Mortals
Version Control for Mere MortalsVersion Control for Mere Mortals
Version Control for Mere Mortals
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Why Mac Sysadmins Love Python
Why Mac Sysadmins Love PythonWhy Mac Sysadmins Love Python
Why Mac Sysadmins Love Python
 
F3X12 FLOW3 Project Lifecycle
F3X12 FLOW3 Project LifecycleF3X12 FLOW3 Project Lifecycle
F3X12 FLOW3 Project Lifecycle
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
 
12 tricks to avoid hackers breaks your CI / CD
12 tricks to avoid hackers breaks your  CI / CD12 tricks to avoid hackers breaks your  CI / CD
12 tricks to avoid hackers breaks your CI / CD
 

Plus de John Paulett

GeoDjango & HTML5 Geolocation
GeoDjango & HTML5 GeolocationGeoDjango & HTML5 Geolocation
GeoDjango & HTML5 GeolocationJohn Paulett
 
XNAT Case Study: DIAN QC Uploader
XNAT Case Study: DIAN QC UploaderXNAT Case Study: DIAN QC Uploader
XNAT Case Study: DIAN QC UploaderJohn Paulett
 
XNAT Open Source Development
XNAT Open Source DevelopmentXNAT Open Source Development
XNAT Open Source DevelopmentJohn Paulett
 
XNAT Tuning & Monitoring
XNAT Tuning & MonitoringXNAT Tuning & Monitoring
XNAT Tuning & MonitoringJohn Paulett
 
Mercurial: Modern Source Control Management
Mercurial: Modern Source Control ManagementMercurial: Modern Source Control Management
Mercurial: Modern Source Control ManagementJohn Paulett
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverJohn Paulett
 

Plus de John Paulett (8)

GeoDjango & HTML5 Geolocation
GeoDjango & HTML5 GeolocationGeoDjango & HTML5 Geolocation
GeoDjango & HTML5 Geolocation
 
XNAT Case Study: DIAN QC Uploader
XNAT Case Study: DIAN QC UploaderXNAT Case Study: DIAN QC Uploader
XNAT Case Study: DIAN QC Uploader
 
XNAT Open Source Development
XNAT Open Source DevelopmentXNAT Open Source Development
XNAT Open Source Development
 
XNAT Tuning & Monitoring
XNAT Tuning & MonitoringXNAT Tuning & Monitoring
XNAT Tuning & Monitoring
 
Mercurial: Modern Source Control Management
Mercurial: Modern Source Control ManagementMercurial: Modern Source Control Management
Mercurial: Modern Source Control Management
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And Failover
 
Drools
DroolsDrools
Drools
 
Automated Testing
Automated TestingAutomated Testing
Automated Testing
 

Dernier

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Dernier (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Getting Started with (Distributed) Version Control

  • 1. Getting Started with (Distributed) Version Control Because what other tools have a blame command? John Paulett jhcore.com April 3, 2009 1
  • 2. Collaboration Bob adds foo() to main.c while Alice edits bar() in main.c. How do they merge? Please do not share code via Windows file sharing! April 3, 2009 2
  • 3. History quot;Oops, we screwed up the release, can we roll back to the last production version?quot; “Who added this bug?” April 3, 2009 3
  • 4. Backup quot;The Photoshop keygen gave me a virus.quot; Sharing files between computers April 3, 2009 4
  • 5. Personally Open source projects Personal projects (master's thesis code) School files (papers, assignments) Config files (~/.ssh/config, ~/.hgrc) April 3, 2009 5
  • 6. Centeralized vs Decentralized Cathedral vs Bazaar Offline commits More atomic commits ● Forking is encouraged Can keep private until ready ● http://en.wikipedia.org/wiki/index.html?curid=755487 April 3, 2009 6
  • 7. VCS Tools cp -R project project.old ● RCS ● CVS ● Subversion ● Perforce ● Visual SafeSource ● ClearCase ● ... ● April 3, 2009 7
  • 8. Distributed VCS Tools Mercurial Plastic SCM ● ● Git SVK ● ● Bazaar Codeville ● ● Monotone GNU arch ● ● Darcs Bitkeeper ● ● ... ● April 3, 2009 8
  • 9. Which one? The new “vim vs emacs” http://xkcd.com/378/ (emacs is better) April 3, 2009 9
  • 10. Mercurial OpenJDK ● Solaris ● Python ● Mozilla ● Netbeans ● April 3, 2009 10
  • 11. Workflow 1. Checkout / Start repo 2. Add / Remove / Edit files 3. Commit your changes 4. Push changes 5. Update / Merge 6. Go to #2 April 3, 2009 11
  • 12. Simple Example # checkout the repository hg clone http://bitbucket.org/johnpaulett/python-hl7/ # add the file server.py to be under version control hg add server.py # commit the file hg commit -m quot;Added a single threaded HL7 socket server.quot; April 3, 2009 12
  • 13. Simple Example # Send my changes to bitbucket hg push # Pull others' changes from bitbucket hg pull hg update # Merge in anyone else's changes hg merge April 3, 2009 13
  • 14. Useful Commands Start a repository: hg init my-emr Find out who changed what in which version: hg blame hg log April 3, 2009 14
  • 15. But I Hate the Command Line TortoiseHg April 3, 2009 15
  • 16. But I Hate the Command Line MercurialEclipse April 3, 2009 16
  • 17. Being a DVCS Dog quot;On the Internet, nobody knows that you're a dog.quot; hgsubversion git-svn April 3, 2009 17 New Yorker, 1993
  • 18. Hosting BitBucket (or GitHub for git) ● Sourceforge ● hg serve ● SSH ● hgweb (via Apache) ● April 3, 2009 18
  • 20. Bad Commit Messages Not Atomic “Fixed a few bugs in the interface. Added an ID field. Removed a couple unnecessary functions. Refactored the context check.” Not Specific “Fixed some bugs.” http://lbrandy.com/blog/2009/03/writing-better-commit-messages/ April 3, 2009 20
  • 21. Customizing hgrc Set locations, username, plugins .hgignore Ignore unwanted files (*.class, *.pyc, *.log) April 3, 2009 21
  • 22. More Info http://www.slideshare.net/johnpaulett/getting-started-with- ● distributed-version-control http://www.selenic.com/mercurial/wiki/ ● http://betterexplained.com/articles/intro-to-distributed-version- ● control-illustrated/ http://bitbucket.org/ ● http://joshcarter.com/productivity/svn_hg_git_for_home_directory ● http://lbrandy.com/blog/2009/03/writing-better-commit-messages/ ● http://bitbucket.org/mercurialeclipse/main/wiki/Home ● http://bitbucket.org/durin42/hgsubversion/wiki/Home ● http://bitbucket.org/tortoisehg/stable/wiki/Home ● April 3, 2009 22