3. PantaRei Design
●
Hong Kong based FOSS service provider
– Content Management System (CMS) with Drupal
– Cloud Hosting Solution with Amazon Web Services (AWS)
●
Business Partner with industry leaders
– 2012, AWS Consulting Partner
– 2013, Acquia Partner
– 2013, Atlassian Experts
– 2014, Rackspace Hosting Partner
11. 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
12.
13. 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
14. 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
15. 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?
16. 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?
23. 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
24.
25.
26.
27. 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.
28.
29. 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!!
30.
31.
32. 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