Version Control & Git

  • 2,295 views
Uploaded on

A brief refresher of version control and an overview of Distributed Version Control and Git.

A brief refresher of version control and an overview of Distributed Version Control and Git.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,295
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
112
Comments
0
Likes
4

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Version Control & Git Geoff Ford & Craig Smith Suncorp
  • 2. According to Wikipedia: “… is the management of changes to documents, programs, and other information stored as computer files.” Image: http://i.ehow.com/images/GlobalPhoto/Articles/2065416/dictionary_Full.jpg
  • 3. Before Version Control  File renaming Code.001 CodeNov1.xml  Directories Nov1Code  Zip files Nov1Code.zip  Nothing at all Image: http://www.stud.u-szeged.hu/Sajben.Emma/TW1128-Rock-Stars.jpg
  • 4. We have moved on… haven’t we? Image http://yabadabadoo.files.wordpress.com/2008/03/puzzled-fred.jpg
  • 5. A Brief History • diff • RVS DVCS Tool 1970’s • SCCS 1980’s • CVS 1990’s Support 2000’s (Bitkeeper, Git, etc…) Image http://www.free-background-wallpaper.com/images/Wallpapers1280/Beach-Wallpaper/Sand-Dunes-Soft.jpg
  • 6. Version Control is…  Backup & restore  Synchronisation  Undo  Track changes  Sandbox / spike  Branch / merge  Not just for code Image http://globalnerdy.com/wordpress/wp-content/uploads/2007/10/version_control_star_trek_style.jpg
  • 7. Check-in & Check-out
  • 8. Branching & Merging
  • 9. Subversion Setup Image http://blog.daemon.com.au/images/SourceImage/svnstructure.jpg
  • 10. Version Control Best Practice  Use good comments  Commit often  Single vs multi project repos  Branch/tag when appropriate  Binaries/large files  Respect the trunk  Get to know your command line & client Image http://www.improvizations.com/Portals/42614/images//best- practice%20checklist-resized-600.jpg
  • 11. • d Visualisation: FishEye/SVNStat
  • 12. Traditonal / Centralised Version Control
  • 13. Distributed Version Control
  • 14. Hybrid Model Version Control
  • 15. Why Distributed Version Control?  Cheap local branches for easy experimenting  History aware merges  Full local history  Offline commits  Each working copy is a complete backup of the repository
  • 16. Example Distributed Version Control Tools  Git (2005) http://git-scm.com  Mercurial (2005) http://mercurial.selenic.com  Bazaar (2005) http://bazaar-vcs.org  Darcs (2004) http://darcs.net
  • 17. Git is Fast
  • 18. Git is Efficient
  • 19. Git Workflow Clone git clone git://example.com/repo.git Working Branch git checkout -b new-feature Commit git add . git commit -m “Commit Message” Rebase & Merge git rebase master git checkout master git merge new-feature Push git push origin
  • 20. Git + SVN Workflow Clone git svn clone http://example.com/repo Working Branch git checkout -b new-feature Commit git add . git commit -m “Commit Message” Rebase & Merge git rebase master git checkout master git merge new-feature Push to SVN git dcommit
  • 21. Repository Many Branches
  • 22. Many Branches + Merges
  • 23. Live Demo
  • 24. Want More Information? Geoff Ford geoff.ford@suncorp.com.au Craig Smith craig.smith@suncorp.com.au References:  http://www.spearce.org/2007/07/difficult-gitk- graphs.html  http://www.infoq.com/articles/dvcs-guide  http://ldn.linuxfoundation.org/article/dvcs-round-one- system-rule-them-all-part-3  http://gaveen.owain.org/2008/05/simple-diagram-on- distributed-vcs-hint.html  http://betterexplained.com/articles/a-visual-guide-to- version-control/  http://en.wikipedia.org/wiki/Revision_control