SlideShare a Scribd company logo
1 of 32
Download to read offline
Barcamp Macau 2014 
Introduction to GIT 
Edison Wong 
2014 Oct 4th
Edison Wong 
● CEO, PantaRei Design 
– hswong3i@pantarei-design.com 
● Drupal developer & contributor 
– https://drupal.org/user/33940 
● HKDUG Co-founder 
– https://groups.drupal.org/drupalhk 
● Startup founder 
– 2009 - PantaRei Design founded 
– 2010 - YBHK applicant 
– 2011 - ITF SERAP applicant 
– 2011 - HKSTP Incu-Tech applicant
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
Outline 
● What is GIT? 
● Why GIT? 
● 15mins Tutorial 
● Advanced Topic(s)
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
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
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
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?
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?
15mins Tutorial 
● git init 
● git status 
● git add 
● git rm 
● git commit 
● git log 
● git remote 
● git push 
● git pull 
● git diff 
● git reset 
● git checkout 
● git branch 
● git merge
Advanced Topic(s) 
● Continuous Integration (CI) 
● Migrate to GIT from SVN 
● Dropbox-like File Sharing
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
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.
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!!
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
Q&A
References 
● http://git-scm.com/ 
● https://try.github.io/levels/1/challenges/1 
● http://www.slideshare.net/svenpeters/getting-git-right 
● https://www.atlassian.com/git/tutorials 
● http://www.webupd8.org/2011/03/set-up-sparkle 
share-with-your-own.html 
● http://www.webupd8.org/2014/03/install-bittorre 
nt-sync-gui-in-ubuntu.html
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

More Related Content

What's hot

What's hot (20)

Docker-Vancouver Meetup - March 18, 2014 - An Introduction to Docker
Docker-Vancouver Meetup - March 18, 2014 - An Introduction to DockerDocker-Vancouver Meetup - March 18, 2014 - An Introduction to Docker
Docker-Vancouver Meetup - March 18, 2014 - An Introduction to Docker
 
Pydata 2020 containers meetup
Pydata  2020 containers meetup Pydata  2020 containers meetup
Pydata 2020 containers meetup
 
Git vs svn
Git vs svnGit vs svn
Git vs svn
 
Using GIT for Everyone
Using GIT for EveryoneUsing GIT for Everyone
Using GIT for Everyone
 
Comparison of SVN and Git
Comparison of SVN and GitComparison of SVN and Git
Comparison of SVN and Git
 
QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger QtDD13 - Qt Creator plugins - Tobias Hunger
QtDD13 - Qt Creator plugins - Tobias Hunger
 
The rise of Docker, and the future of computing
The rise of Docker, and the future of computingThe rise of Docker, and the future of computing
The rise of Docker, and the future of computing
 
2015 03 nllgg-event Organizing Duoconferences.
2015 03 nllgg-event Organizing Duoconferences.2015 03 nllgg-event Organizing Duoconferences.
2015 03 nllgg-event Organizing Duoconferences.
 
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumIntroduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
 
Docker Barcelona Meetup - An Introduction to BuildKit
Docker Barcelona Meetup - An Introduction to BuildKitDocker Barcelona Meetup - An Introduction to BuildKit
Docker Barcelona Meetup - An Introduction to BuildKit
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
An introduction to git
An introduction to gitAn introduction to git
An introduction to git
 
Atomic Developer Bundle
Atomic Developer BundleAtomic Developer Bundle
Atomic Developer Bundle
 
Why we ditched TFS and embraced Git, Github, TeamCity and Myget
Why we ditched TFS and embraced Git, Github, TeamCity and MygetWhy we ditched TFS and embraced Git, Github, TeamCity and Myget
Why we ditched TFS and embraced Git, Github, TeamCity and Myget
 
Git.odp 0
Git.odp 0Git.odp 0
Git.odp 0
 
Kubernetes 1.12 Update and Container Security with Liz Rice
Kubernetes 1.12 Update and Container Security with Liz RiceKubernetes 1.12 Update and Container Security with Liz Rice
Kubernetes 1.12 Update and Container Security with Liz Rice
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
 
Docker deep dive
Docker deep diveDocker deep dive
Docker deep dive
 
The Cloud Convergence: OpenStack and Kubernetes
The Cloud Convergence: OpenStack and KubernetesThe Cloud Convergence: OpenStack and Kubernetes
The Cloud Convergence: OpenStack and Kubernetes
 
Openshift/Kubernetes integration with Apache YARN
Openshift/Kubernetes integration with Apache YARNOpenshift/Kubernetes integration with Apache YARN
Openshift/Kubernetes integration with Apache YARN
 

Viewers also liked

Viewers also liked (17)

OSS Community Meeting - OSS Community Management for Dummy
OSS Community Meeting - OSS Community Management for DummyOSS Community Meeting - OSS Community Management for Dummy
OSS Community Meeting - OSS Community Management for Dummy
 
Entrepreneurship Talk
Entrepreneurship TalkEntrepreneurship Talk
Entrepreneurship Talk
 
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
 
BarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management System
BarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management SystemBarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management System
BarCamp Hong Kong 2015 - AuthBucket - Open Source Identity Management System
 
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile DevelopmentCUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
 
Hong Kong Drupal User Group - Sep 13th
Hong Kong Drupal User Group - Sep 13thHong Kong Drupal User Group - Sep 13th
Hong Kong Drupal User Group - Sep 13th
 
Drupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xDrupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.x
 
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
 
Barcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management System
Barcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management SystemBarcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management System
Barcamp Hong Kong 2014 - Commercial Use of OSS Web Content Management System
 
Hong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thHong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8th
 
drustack a mobile-friendly web content management system (cms)
drustack   a mobile-friendly web content management system (cms)drustack   a mobile-friendly web content management system (cms)
drustack a mobile-friendly web content management system (cms)
 
Hong Kong Drupal User Group - 2014 April 12th
Hong Kong Drupal User Group - 2014 April 12thHong Kong Drupal User Group - 2014 April 12th
Hong Kong Drupal User Group - 2014 April 12th
 
[20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team][20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team]
 
The World We Live In
The World We Live InThe World We Live In
The World We Live In
 
Hong Kong Drupal User Group - 2014 March 8th
Hong Kong Drupal User Group - 2014 March 8thHong Kong Drupal User Group - 2014 March 8th
Hong Kong Drupal User Group - 2014 March 8th
 
Barcamp Macau 2014 - Introduction to AWS
Barcamp Macau 2014 - Introduction to AWSBarcamp Macau 2014 - Introduction to AWS
Barcamp Macau 2014 - Introduction to AWS
 
Open Source.HK Workshop - 2014 Oct 11th
Open Source.HK Workshop - 2014 Oct 11thOpen Source.HK Workshop - 2014 Oct 11th
Open Source.HK Workshop - 2014 Oct 11th
 

Similar to Barcamp Macau 2014 - Introduction to GIT

WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?
Weaveworks
 

Similar to Barcamp Macau 2014 - Introduction to GIT (20)

Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopOpen Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPress
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Plone Intranet under the hood
Plone Intranet under the hoodPlone Intranet under the hood
Plone Intranet under the hood
 
Git In One Evening
Git In One EveningGit In One Evening
Git In One Evening
 
[HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution]
[HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution][HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution]
[HKOSCON][20220611][AlviStack: Hong Kong Based Kubernetes Distribution]
 
GitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by ScalaGitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by Scala
 
Delivering a bleeding edge community-led openstack distribution: RDO
Delivering a bleeding edge community-led openstack distribution: RDO Delivering a bleeding edge community-led openstack distribution: RDO
Delivering a bleeding edge community-led openstack distribution: RDO
 
Git Presentation
Git PresentationGit Presentation
Git Presentation
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub Explained
 
Do You Get Git?
Do You Get Git? Do You Get Git?
Do You Get Git?
 
pfSense 2.3 Preview - pfSense Hangout December 2015
pfSense 2.3 Preview - pfSense Hangout December 2015pfSense 2.3 Preview - pfSense Hangout December 2015
pfSense 2.3 Preview - pfSense Hangout December 2015
 
Git SVN Migrate Reasons
Git SVN Migrate ReasonsGit SVN Migrate Reasons
Git SVN Migrate Reasons
 
20160401 guster-roadmap
20160401 guster-roadmap20160401 guster-roadmap
20160401 guster-roadmap
 
20160401 Gluster-roadmap
20160401 Gluster-roadmap20160401 Gluster-roadmap
20160401 Gluster-roadmap
 
20160401 guster-roadmap
20160401 guster-roadmap20160401 guster-roadmap
20160401 guster-roadmap
 
WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?WTF is GitOps and Why You Should Care?
WTF is GitOps and Why You Should Care?
 
WTF is GitOps & Why Should You Care?
WTF is GitOps & Why Should You Care?WTF is GitOps & Why Should You Care?
WTF is GitOps & Why Should You Care?
 
Git: be social
Git: be socialGit: be social
Git: be social
 

More from Wong Hoi Sing Edison

More from Wong Hoi Sing Edison (13)

[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes][HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
 
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes][HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
 
[HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes]
[HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes][HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes]
[HKOSCON][20190615][DevOps with Ansible, From Native to Kubernetes]
 
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes][BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
[BarCamp2018][20180915][Tips for Virtual Hosting on Kubernetes]
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
 
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
 
DruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cmsDruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cms
 
IT Entrepreneurship Talk - City University of Hong Kong
IT Entrepreneurship Talk - City University of Hong KongIT Entrepreneurship Talk - City University of Hong Kong
IT Entrepreneurship Talk - City University of Hong Kong
 
Open Innovation Lab (OIL) - 2014 Sep 26th
Open Innovation Lab (OIL) - 2014 Sep 26thOpen Innovation Lab (OIL) - 2014 Sep 26th
Open Innovation Lab (OIL) - 2014 Sep 26th
 
Hong Kong Drupal User Group - Sep 13th
Hong Kong Drupal User Group - Sep 13thHong Kong Drupal User Group - Sep 13th
Hong Kong Drupal User Group - Sep 13th
 
Hong Kong Drupal User Group - 2014 June 14th
Hong Kong Drupal User Group - 2014 June 14thHong Kong Drupal User Group - 2014 June 14th
Hong Kong Drupal User Group - 2014 June 14th
 
Hong Kong Drupal User Group - 2014 May 10th
Hong Kong Drupal User Group - 2014 May 10thHong Kong Drupal User Group - 2014 May 10th
Hong Kong Drupal User Group - 2014 May 10th
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Barcamp Macau 2014 - Introduction to GIT

  • 1. Barcamp Macau 2014 Introduction to GIT Edison Wong 2014 Oct 4th
  • 2. Edison Wong ● CEO, PantaRei Design – hswong3i@pantarei-design.com ● Drupal developer & contributor – https://drupal.org/user/33940 ● HKDUG Co-founder – https://groups.drupal.org/drupalhk ● Startup founder – 2009 - PantaRei Design founded – 2010 - YBHK applicant – 2011 - ITF SERAP applicant – 2011 - HKSTP Incu-Tech applicant
  • 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?
  • 14.
  • 15. 15mins Tutorial ● git init ● git status ● git add ● git rm ● git commit ● git log ● git remote ● git push ● git pull ● git diff ● git reset ● git checkout ● git branch ● git merge
  • 16.
  • 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
  • 28.
  • 29.
  • 30. Q&A
  • 31. References ● http://git-scm.com/ ● https://try.github.io/levels/1/challenges/1 ● http://www.slideshare.net/svenpeters/getting-git-right ● https://www.atlassian.com/git/tutorials ● http://www.webupd8.org/2011/03/set-up-sparkle share-with-your-own.html ● http://www.webupd8.org/2014/03/install-bittorre nt-sync-gui-in-ubuntu.html
  • 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