3. PantaRei Design
● Hong Kong based Free and Open Source Software (FOSS) service provider
– Content Management System (CMS) with Drupal
– Cloud hosting with Amazon Web Services (AWS)
– Team collaborate solution with Atlassian
● Business Partnership
– 2012 - AWS Consulting Partner
– 2013 - Acquia Partner
– 2013 - Atlassian Experts
– 2014 - Rackspace Hosting Partner
● FOSS Contributor
– 2008 - Hong Kong Drupal User Group Co-founder
– 2012 - Drupal Services Provider
4.
5.
6.
7. Outline
● What is GIT?
● Why GIT?
● 15mins Tutorial
● Advanced Topic(s)
8. What is GIT?
● Distributed revision control and source code
management (SCM) system
● Designed to handle everything from small to
very large projects
● Designed and developed by Linus Torvalds for
Linux kernel development in 2005
9.
10. Why GIT?
● Manage code changes by rename file will soon
reach its limitation, e.g.
– mycode-20140308.php
– mycode-201403080930.php
● Archive entire folder will make case even worse
– Need to extract before compare the changes
● Share progress with co-workers become
nightmare
11. Why GIT? (cont.)
● CVS
– Manage revision per file (rename not support)
– Remote repository server required (no local folder
offline management)
– Single commit management (other else contribute
by submit patches)
– TOOOOO OLD (well...)
● Used by Drupal during 7.x development cycle
● After Drupal 7 released, soon migrated to GIT
12. Why GIT? (cont.)
● SVN
– Manage revision per folder
– Remote repository server required
– Single commit management
– A bit better than CVS, but branching model still
looks crazy
● At least, we now have GIT, why still using SVN?
13. Why GIT? (cont.)
● GIT
– Manage revision per entire project
– Remote/local repository supported
● git init
● git add --all .
● git commit -am 'Initial commit'
● git log
● git status
– Distributed workflows
– Used by https://drupal.org/ since Drupal 7
– You also know https://github.com/, isn't it?
17. Advanced Topic(s)
● Continuous Integration (CI)
● Migrate to GIT from SVN
● Dropbox-like File Sharing
18. Continuous Integration (CI)
● Test-Driven Development (TDD) or Behavior-
Driven Development (BDD)
● Combination with automated unit tests, e.g.
running phpunit per each GIT commit
– GitHub → Travis CI
– Stash → Bamboo
19.
20.
21.
22. Migrate to GIT from SVN
● Prepare your environment for the migration.
● Convert the SVN repository to a local GIT repository.
● Synchronize the local GIT repository when the SVN
repository changes.
● Share the GIT repository with your developers via
Bitbucket.
● Migrate your development efforts from SVN to GIT.
23.
24. Dropbox-like File Sharing
● Dropbox
– Public cloud-based file hosting service
● GIT
– Repository management with history
● SparkleShare
– GIT-based file hosting solution with history
– Just manage share and permission as normal GIT repository
– Support public (e.g. GitHub, BitBucket) or private (e.g. Stash, GitLab) GIT
repository
– Suitable for small size file sharing
– Dropbox-like operation, NO GIT command is required!!
25.
26.
27. Dropbox-like File Sharing (cont.)
● BitTorrent Sync
– Peer-to-peer file synchronization
– Over the Internet via secure, distributed P2P technology
● Unlike GIT-based solution:
– Suitable for large-size binary file hosting
– No complete history support
● How we use SparkleShare and BitTorrent Sync?
– BitTorrent Sync: Short-term working copy sharing
– SparkleShare: Long-lasting archive with history
32. Thank You
● Please feel free to contact us:
– Unit 207, 2/F IC Development Centre, No.6 Science
Park West Avenue, Hong Kong Science Park,
Shatin, N.T.
– +852 3576 3812
– http://pantarei-design.com/
– sales@pantarei-design.com