SlideShare a Scribd company logo
Git in real product
Git???
• Git là 1 hệ thống Distributed revision
control (Distributed version control or
decentralized version control), tạm dịch là
hệ thống quản lý source phân tán.
• By Linus Torvalds
• Chỉ mất 3s để đồng bộ metadata !!!
History
• Bắt đầu được phát triển tháng 03/04/2005
• Public 06/04/2005
• Self-hosting vào 07/04/2005
• Lần merge đầu tiên giữa nhiều branch diễn ra
vào 18/04/2005
• Torvals đã đạt được mục tiêu của ông vào
29/04/2005 khi ông thử kiểm với Linux Kernel
trong 6.7s
• Release cùng kernel 2.6.12 vào 16/06/2005
• Release phiên bản 1.0 vào 21/12/2005
Spec
• Strong support for non-linear development: hỗ trợ mạnh mẽ phát
triển không tuyến tính (phát triển song song các chức năng)
• Distributed development: Hỗ trợ phát triển và lưu source 1 cách
phân tán giống như Darcs, BitKeeper, Mercurial, SVK, Bazaar and
Monotone. Người dùng sẽ có 1 bản copy trên local và sẽ sử dụng
nó để phát triển, merger branch,...
• Compatibility with existing systems/protocols: thích ứng được
với những hệ thống và giao thức hiện có (HTTP,FTP,rsync,ssh,
plain socket,...)
• Efficient handling of large projects: có khả năng quản lý được
những project lớn, git hoạt động nhanh, mạnh mẽ, hiệu suất cao.
• Cryptographic authentication of history: xác thực history bằng
mật mã.
• Toolkit-based design: git được viết bằng C để nâng cao tốc độ
thực thi.
• Pluggable merge strategies: git có 1 model để meger không toàn
vẹn và cũng hỗ trợ rất nhiều thuật toán để hoàn thiện quá trình
merge, chỉ với trường hợp ko thể meger được thì mới cần người
dùng phải tiến hành merge bằng tay.
Mô hình Git
Decentralized but centralized
Git sv SVN
Git sv SVN
• GIT is distributed, SVN is not
•GIT stores content as metadata,
SVN stores just files
•GIT branches are not the same
as SVN branches
•GIT’s content integrity is better
than SVN’s: SHA-1
• Using Git in real
product
Branch
• Main branches:
– master
– develop
• Supporting branches
– Feature branches
– Release branches
– Hotfix branches
Main branch
• branch sẽ tồn tại mãi mãi và
song song
– master: ứng với phiên bản
thực tế của product
– develop: ứng với phiên bản
cuối cùng sẵn sàng để release
lên phiên bản thực tế
Supporting branches
• Feature branches
– branch off từ : develop
– merge vào: develop
– Quy luật đặt tên: bất kể j trừ master, develop,
release-, hay hotfix-
• Release branches
– Được branch off từ:develop
– Được merge vào develop và master.
– Quy tắc đặt tên: release-*
Supporting branches
• Hotfix branches
– Branch off from: master
– được merge vào:develop and master
– Quy tắc đặt tên:hotfix-*
Supporting branches
Gitlab
• Open source
• Git repository management, code reviews,
issue tracking, activity feeds, wikis and
continuous integration
• 25,000 users on one server or a highly
available active/active cluster
https://about.gitlab.com/downloads/
Ref
• Git flow
– https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
– http://nvie.com/posts/a-successful-git-branching-model/
• Tut
– Online Training
• https://try.github.io/levels/1/challenges/1
• http://pcottle.github.io/learnGitBranching/
– Other
• http://git-scm.com/docs/gittutorial
• https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init
Git in real product

More Related Content

More from GMO-Z.com Vietnam Lab Center

高負荷に耐えうるWebApplication Serverの作り方
高負荷に耐えうるWebApplication Serverの作り方高負荷に耐えうるWebApplication Serverの作り方
高負荷に耐えうるWebApplication Serverの作り方
GMO-Z.com Vietnam Lab Center
 
Phương pháp và chiến lược đối ứng tải trong Web Application Server
Phương pháp và chiến lược đối ứng tải trong Web Application ServerPhương pháp và chiến lược đối ứng tải trong Web Application Server
Phương pháp và chiến lược đối ứng tải trong Web Application Server
GMO-Z.com Vietnam Lab Center
 
Ứng dụng NLP vào việc xác định ý muốn người dùng (Intent Detection) và sửa lỗ...
Ứng dụng NLP vào việc xác định ý muốn người dùng (Intent Detection) và sửa lỗ...Ứng dụng NLP vào việc xác định ý muốn người dùng (Intent Detection) và sửa lỗ...
Ứng dụng NLP vào việc xác định ý muốn người dùng (Intent Detection) và sửa lỗ...
GMO-Z.com Vietnam Lab Center
 
Tìm hiểu và triển khai ứng dụng Web với Kubernetes
Tìm hiểu và triển khai ứng dụng Web với KubernetesTìm hiểu và triển khai ứng dụng Web với Kubernetes
Tìm hiểu và triển khai ứng dụng Web với Kubernetes
GMO-Z.com Vietnam Lab Center
 
Xây dựng hệ thống quản lý sân bóng sử dụng Yii Framework
Xây dựng hệ thống quản lý sân bóng sử dụng Yii FrameworkXây dựng hệ thống quản lý sân bóng sử dụng Yii Framework
Xây dựng hệ thống quản lý sân bóng sử dụng Yii Framework
GMO-Z.com Vietnam Lab Center
 
Nhận biết giao dịch lừa đảo sử dụng học máy
Nhận biết giao dịch lừa đảo sử dụng học máyNhận biết giao dịch lừa đảo sử dụng học máy
Nhận biết giao dịch lừa đảo sử dụng học máy
GMO-Z.com Vietnam Lab Center
 
Hệ thống giám sát nhận diện khuôn mặt
Hệ thống giám sát nhận diện khuôn mặtHệ thống giám sát nhận diện khuôn mặt
Hệ thống giám sát nhận diện khuôn mặt
GMO-Z.com Vietnam Lab Center
 
Image Style Transfer
Image Style TransferImage Style Transfer
Image Style Transfer
GMO-Z.com Vietnam Lab Center
 
Optimizing MySQL queries
Optimizing MySQL queriesOptimizing MySQL queries
Optimizing MySQL queries
GMO-Z.com Vietnam Lab Center
 
Surveillance on slam technology
Surveillance on slam technologySurveillance on slam technology
Surveillance on slam technology
GMO-Z.com Vietnam Lab Center
 
Blockchain & Smart Contract - Bắt đầu như thế nào và các ứng dụng
Blockchain & Smart Contract - Bắt đầu như thế nào và các ứng dụngBlockchain & Smart Contract - Bắt đầu như thế nào và các ứng dụng
Blockchain & Smart Contract - Bắt đầu như thế nào và các ứng dụng
GMO-Z.com Vietnam Lab Center
 
Giới thiệu Embulk
Giới thiệu Embulk Giới thiệu Embulk
Giới thiệu Embulk
GMO-Z.com Vietnam Lab Center
 
Giới thiệu docker và ứng dụng trong ci-cd
Giới thiệu docker và ứng dụng trong ci-cdGiới thiệu docker và ứng dụng trong ci-cd
Giới thiệu docker và ứng dụng trong ci-cd
GMO-Z.com Vietnam Lab Center
 
Tài liệu giới thiệu công ty GMO-Z.com Vietnam Lab Center
Tài liệu giới thiệu công ty GMO-Z.com Vietnam Lab CenterTài liệu giới thiệu công ty GMO-Z.com Vietnam Lab Center
Tài liệu giới thiệu công ty GMO-Z.com Vietnam Lab Center
GMO-Z.com Vietnam Lab Center
 
Chia se Agile
Chia se AgileChia se Agile
Agile retrospective
Agile retrospectiveAgile retrospective
Agile retrospective
GMO-Z.com Vietnam Lab Center
 
Giới thiệu Agile + Scrum
Giới thiệu Agile + ScrumGiới thiệu Agile + Scrum
Giới thiệu Agile + Scrum
GMO-Z.com Vietnam Lab Center
 
Create android app can send SMS and Email by React Natice
Create android app can send SMS and Email by React NaticeCreate android app can send SMS and Email by React Natice
Create android app can send SMS and Email by React Natice
GMO-Z.com Vietnam Lab Center
 
Introduce React Native
Introduce React NativeIntroduce React Native
Introduce React Native
GMO-Z.com Vietnam Lab Center
 
Spark tuning
Spark tuningSpark tuning

More from GMO-Z.com Vietnam Lab Center (20)

高負荷に耐えうるWebApplication Serverの作り方
高負荷に耐えうるWebApplication Serverの作り方高負荷に耐えうるWebApplication Serverの作り方
高負荷に耐えうるWebApplication Serverの作り方
 
Phương pháp và chiến lược đối ứng tải trong Web Application Server
Phương pháp và chiến lược đối ứng tải trong Web Application ServerPhương pháp và chiến lược đối ứng tải trong Web Application Server
Phương pháp và chiến lược đối ứng tải trong Web Application Server
 
Ứng dụng NLP vào việc xác định ý muốn người dùng (Intent Detection) và sửa lỗ...
Ứng dụng NLP vào việc xác định ý muốn người dùng (Intent Detection) và sửa lỗ...Ứng dụng NLP vào việc xác định ý muốn người dùng (Intent Detection) và sửa lỗ...
Ứng dụng NLP vào việc xác định ý muốn người dùng (Intent Detection) và sửa lỗ...
 
Tìm hiểu và triển khai ứng dụng Web với Kubernetes
Tìm hiểu và triển khai ứng dụng Web với KubernetesTìm hiểu và triển khai ứng dụng Web với Kubernetes
Tìm hiểu và triển khai ứng dụng Web với Kubernetes
 
Xây dựng hệ thống quản lý sân bóng sử dụng Yii Framework
Xây dựng hệ thống quản lý sân bóng sử dụng Yii FrameworkXây dựng hệ thống quản lý sân bóng sử dụng Yii Framework
Xây dựng hệ thống quản lý sân bóng sử dụng Yii Framework
 
Nhận biết giao dịch lừa đảo sử dụng học máy
Nhận biết giao dịch lừa đảo sử dụng học máyNhận biết giao dịch lừa đảo sử dụng học máy
Nhận biết giao dịch lừa đảo sử dụng học máy
 
Hệ thống giám sát nhận diện khuôn mặt
Hệ thống giám sát nhận diện khuôn mặtHệ thống giám sát nhận diện khuôn mặt
Hệ thống giám sát nhận diện khuôn mặt
 
Image Style Transfer
Image Style TransferImage Style Transfer
Image Style Transfer
 
Optimizing MySQL queries
Optimizing MySQL queriesOptimizing MySQL queries
Optimizing MySQL queries
 
Surveillance on slam technology
Surveillance on slam technologySurveillance on slam technology
Surveillance on slam technology
 
Blockchain & Smart Contract - Bắt đầu như thế nào và các ứng dụng
Blockchain & Smart Contract - Bắt đầu như thế nào và các ứng dụngBlockchain & Smart Contract - Bắt đầu như thế nào và các ứng dụng
Blockchain & Smart Contract - Bắt đầu như thế nào và các ứng dụng
 
Giới thiệu Embulk
Giới thiệu Embulk Giới thiệu Embulk
Giới thiệu Embulk
 
Giới thiệu docker và ứng dụng trong ci-cd
Giới thiệu docker và ứng dụng trong ci-cdGiới thiệu docker và ứng dụng trong ci-cd
Giới thiệu docker và ứng dụng trong ci-cd
 
Tài liệu giới thiệu công ty GMO-Z.com Vietnam Lab Center
Tài liệu giới thiệu công ty GMO-Z.com Vietnam Lab CenterTài liệu giới thiệu công ty GMO-Z.com Vietnam Lab Center
Tài liệu giới thiệu công ty GMO-Z.com Vietnam Lab Center
 
Chia se Agile
Chia se AgileChia se Agile
Chia se Agile
 
Agile retrospective
Agile retrospectiveAgile retrospective
Agile retrospective
 
Giới thiệu Agile + Scrum
Giới thiệu Agile + ScrumGiới thiệu Agile + Scrum
Giới thiệu Agile + Scrum
 
Create android app can send SMS and Email by React Natice
Create android app can send SMS and Email by React NaticeCreate android app can send SMS and Email by React Natice
Create android app can send SMS and Email by React Natice
 
Introduce React Native
Introduce React NativeIntroduce React Native
Introduce React Native
 
Spark tuning
Spark tuningSpark tuning
Spark tuning
 

Git in real product

  • 1. Git in real product
  • 2. Git??? • Git là 1 hệ thống Distributed revision control (Distributed version control or decentralized version control), tạm dịch là hệ thống quản lý source phân tán. • By Linus Torvalds • Chỉ mất 3s để đồng bộ metadata !!!
  • 3. History • Bắt đầu được phát triển tháng 03/04/2005 • Public 06/04/2005 • Self-hosting vào 07/04/2005 • Lần merge đầu tiên giữa nhiều branch diễn ra vào 18/04/2005 • Torvals đã đạt được mục tiêu của ông vào 29/04/2005 khi ông thử kiểm với Linux Kernel trong 6.7s • Release cùng kernel 2.6.12 vào 16/06/2005 • Release phiên bản 1.0 vào 21/12/2005
  • 4. Spec • Strong support for non-linear development: hỗ trợ mạnh mẽ phát triển không tuyến tính (phát triển song song các chức năng) • Distributed development: Hỗ trợ phát triển và lưu source 1 cách phân tán giống như Darcs, BitKeeper, Mercurial, SVK, Bazaar and Monotone. Người dùng sẽ có 1 bản copy trên local và sẽ sử dụng nó để phát triển, merger branch,... • Compatibility with existing systems/protocols: thích ứng được với những hệ thống và giao thức hiện có (HTTP,FTP,rsync,ssh, plain socket,...) • Efficient handling of large projects: có khả năng quản lý được những project lớn, git hoạt động nhanh, mạnh mẽ, hiệu suất cao. • Cryptographic authentication of history: xác thực history bằng mật mã. • Toolkit-based design: git được viết bằng C để nâng cao tốc độ thực thi. • Pluggable merge strategies: git có 1 model để meger không toàn vẹn và cũng hỗ trợ rất nhiều thuật toán để hoàn thiện quá trình merge, chỉ với trường hợp ko thể meger được thì mới cần người dùng phải tiến hành merge bằng tay.
  • 8. Git sv SVN • GIT is distributed, SVN is not •GIT stores content as metadata, SVN stores just files •GIT branches are not the same as SVN branches •GIT’s content integrity is better than SVN’s: SHA-1
  • 9. • Using Git in real product
  • 10. Branch • Main branches: – master – develop • Supporting branches – Feature branches – Release branches – Hotfix branches
  • 11. Main branch • branch sẽ tồn tại mãi mãi và song song – master: ứng với phiên bản thực tế của product – develop: ứng với phiên bản cuối cùng sẵn sàng để release lên phiên bản thực tế
  • 12. Supporting branches • Feature branches – branch off từ : develop – merge vào: develop – Quy luật đặt tên: bất kể j trừ master, develop, release-, hay hotfix- • Release branches – Được branch off từ:develop – Được merge vào develop và master. – Quy tắc đặt tên: release-*
  • 13. Supporting branches • Hotfix branches – Branch off from: master – được merge vào:develop and master – Quy tắc đặt tên:hotfix-*
  • 15. Gitlab • Open source • Git repository management, code reviews, issue tracking, activity feeds, wikis and continuous integration • 25,000 users on one server or a highly available active/active cluster
  • 17. Ref • Git flow – https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow – http://nvie.com/posts/a-successful-git-branching-model/ • Tut – Online Training • https://try.github.io/levels/1/challenges/1 • http://pcottle.github.io/learnGitBranching/ – Other • http://git-scm.com/docs/gittutorial • https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init