SlideShare a Scribd company logo
1 of 18
Download to read offline
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
Giới thiệu git

More Related Content

What's hot

Bài 8: Triển khai bảo mật sử dụng chính sách nhóm (Group policy) - Giáo trình...
Bài 8: Triển khai bảo mật sử dụng chính sách nhóm (Group policy) - Giáo trình...Bài 8: Triển khai bảo mật sử dụng chính sách nhóm (Group policy) - Giáo trình...
Bài 8: Triển khai bảo mật sử dụng chính sách nhóm (Group policy) - Giáo trình...MasterCode.vn
 
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...Vietnam Open Infrastructure User Group
 
Git branching strategies
Git branching strategiesGit branching strategies
Git branching strategiesjstack
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowMikhail Melnik
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Omar Fathy
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdfTilton2
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentationMack Hardy
 
Room 1 - 2 - Nguyễn Văn Thắng & Dzung Nguyen - Proxmox VE và ZFS over iscsi
Room 1 - 2 - Nguyễn Văn Thắng & Dzung Nguyen - Proxmox VE và ZFS over iscsiRoom 1 - 2 - Nguyễn Văn Thắng & Dzung Nguyen - Proxmox VE và ZFS over iscsi
Room 1 - 2 - Nguyễn Văn Thắng & Dzung Nguyen - Proxmox VE và ZFS over iscsiVietnam Open Infrastructure User Group
 
Hướng dẫn sử dụng phần mềm packet tracer
Hướng dẫn sử dụng phần mềm packet tracerHướng dẫn sử dụng phần mềm packet tracer
Hướng dẫn sử dụng phần mềm packet tracerBình Tân Phú
 
Introduction to Helm
Introduction to HelmIntroduction to Helm
Introduction to HelmHarshal Shah
 
Bai04 quan ly tien trinh
Bai04   quan ly tien trinhBai04   quan ly tien trinh
Bai04 quan ly tien trinhVũ Sang
 
lý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tánlý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tánNgo Trung
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model abodeltae
 
Quản lý dự án phần mềm bằng SVN
Quản lý dự án phần mềm bằng SVN Quản lý dự án phần mềm bằng SVN
Quản lý dự án phần mềm bằng SVN Lương Bá Hợp
 
Tổng quan ASP.NET CORE - NIVIKI.COM
Tổng quan ASP.NET CORE - NIVIKI.COMTổng quan ASP.NET CORE - NIVIKI.COM
Tổng quan ASP.NET CORE - NIVIKI.COMKhoa Nguyen
 
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớn
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớnHadoop - Hệ thống tính toán và xử lý dữ liệu lớn
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớnThành Thư Thái
 
Hệ điều hành linux (1)
Hệ điều hành linux (1)Hệ điều hành linux (1)
Hệ điều hành linux (1)khung196
 
Bài 1: Giới thiệu Android
Bài 1: Giới thiệu AndroidBài 1: Giới thiệu Android
Bài 1: Giới thiệu Androidhoccungdoanhnghiep
 

What's hot (20)

Bài 8: Triển khai bảo mật sử dụng chính sách nhóm (Group policy) - Giáo trình...
Bài 8: Triển khai bảo mật sử dụng chính sách nhóm (Group policy) - Giáo trình...Bài 8: Triển khai bảo mật sử dụng chính sách nhóm (Group policy) - Giáo trình...
Bài 8: Triển khai bảo mật sử dụng chính sách nhóm (Group policy) - Giáo trình...
 
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
 
Git branching strategies
Git branching strategiesGit branching strategies
Git branching strategies
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
Room 1 - 2 - Nguyễn Văn Thắng & Dzung Nguyen - Proxmox VE và ZFS over iscsi
Room 1 - 2 - Nguyễn Văn Thắng & Dzung Nguyen - Proxmox VE và ZFS over iscsiRoom 1 - 2 - Nguyễn Văn Thắng & Dzung Nguyen - Proxmox VE và ZFS over iscsi
Room 1 - 2 - Nguyễn Văn Thắng & Dzung Nguyen - Proxmox VE và ZFS over iscsi
 
Hướng dẫn sử dụng phần mềm packet tracer
Hướng dẫn sử dụng phần mềm packet tracerHướng dẫn sử dụng phần mềm packet tracer
Hướng dẫn sử dụng phần mềm packet tracer
 
Introduction to Helm
Introduction to HelmIntroduction to Helm
Introduction to Helm
 
Bai04 quan ly tien trinh
Bai04   quan ly tien trinhBai04   quan ly tien trinh
Bai04 quan ly tien trinh
 
lý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tánlý thuyết cơ sở dữ liệu phân tán
lý thuyết cơ sở dữ liệu phân tán
 
A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
 
Quản lý dự án phần mềm bằng SVN
Quản lý dự án phần mềm bằng SVN Quản lý dự án phần mềm bằng SVN
Quản lý dự án phần mềm bằng SVN
 
Tổng quan ASP.NET CORE - NIVIKI.COM
Tổng quan ASP.NET CORE - NIVIKI.COMTổng quan ASP.NET CORE - NIVIKI.COM
Tổng quan ASP.NET CORE - NIVIKI.COM
 
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớn
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớnHadoop - Hệ thống tính toán và xử lý dữ liệu lớn
Hadoop - Hệ thống tính toán và xử lý dữ liệu lớn
 
Hệ điều hành linux (1)
Hệ điều hành linux (1)Hệ điều hành linux (1)
Hệ điều hành linux (1)
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Bài 1: Giới thiệu Android
Bài 1: Giới thiệu AndroidBài 1: Giới thiệu Android
Bài 1: Giới thiệu Android
 

Similar to Giới thiệu git

Similar to Giới thiệu git (10)

Git in real product
Git in real productGit in real product
Git in real product
 
Tranning git
Tranning gitTranning git
Tranning git
 
Tranning git
Tranning gitTranning git
Tranning git
 
2016
20162016
2016
 
Git it
Git itGit it
Git it
 
VNPAY Git Seminar
VNPAY Git SeminarVNPAY Git Seminar
VNPAY Git Seminar
 
Guilde GIT.pptx
Guilde GIT.pptxGuilde GIT.pptx
Guilde GIT.pptx
 
Subversion Seminar [2010]
Subversion Seminar [2010]Subversion Seminar [2010]
Subversion Seminar [2010]
 
Clear case
Clear caseClear case
Clear case
 
Bang Cuu Chuong Git | NIIT
Bang Cuu Chuong Git | NIITBang Cuu Chuong Git | NIIT
Bang Cuu Chuong Git | NIIT
 

Giới thiệu git

  • 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