Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
Submit search
EN
Uploaded by
Tony Yeh
207 views
Intro to Git 投影片
AI-enhanced description
本文件介绍了Git的基本概念、安装方法和使用技巧。强调了Git的分散式特点及其工作流程,包括修改、暂存和提交文件的步骤。此外,提供了最佳实践,包括分支管理、提交规范及协作开发的建议。
Technology
◦
Read more
0
Save
Share
Embed
Embed presentation
Download
Download to read offline
1
/ 34
2
/ 34
3
/ 34
4
/ 34
5
/ 34
6
/ 34
7
/ 34
8
/ 34
9
/ 34
10
/ 34
11
/ 34
12
/ 34
13
/ 34
14
/ 34
15
/ 34
16
/ 34
17
/ 34
18
/ 34
19
/ 34
20
/ 34
21
/ 34
22
/ 34
23
/ 34
24
/ 34
25
/ 34
26
/ 34
27
/ 34
28
/ 34
29
/ 34
30
/ 34
31
/ 34
32
/ 34
33
/ 34
34
/ 34
More Related Content
PDF
寫給大家的 Git 教學
by
littlebtc
PPTX
開發用不著打一架 - 分散式版本控制 Git
by
Calvin Huang
PPTX
Gitlab
by
Tom Chen
PPTX
Visual Studio 2015 與 Git 開發實戰
by
Will Huang
PDF
Git&Github Tutorial
by
Ting Wen Su
PDF
Git與source tree 基礎教學
by
Duncan Chen
PDF
A successful git branching model 導讀
by
Wen Liao
PPTX
git merge 與 rebase 的觀念與實務應用
by
Will Huang
寫給大家的 Git 教學
by
littlebtc
開發用不著打一架 - 分散式版本控制 Git
by
Calvin Huang
Gitlab
by
Tom Chen
Visual Studio 2015 與 Git 開發實戰
by
Will Huang
Git&Github Tutorial
by
Ting Wen Su
Git與source tree 基礎教學
by
Duncan Chen
A successful git branching model 導讀
by
Wen Liao
git merge 與 rebase 的觀念與實務應用
by
Will Huang
What's hot
PPTX
Azure Web App on Linux @ Global Azure Bootcamp 2017 Taiwan
by
Will Huang
PPTX
Angular 4 網站開發最佳實務 (Modern Web 2017)
by
Will Huang
PPTX
工程師必備第一工具 - Git
by
Alan Tsai
PPTX
Android 程式設計(4)
by
Roy Wang
PPTX
Git 入門與實作
by
奕浦 郭
PDF
ALPHAhackathon: How to collaborate
by
Wen-Tien Chang
PDF
Xcode 的 git 版本管理
by
彼得潘 Pan
PDF
Git 版本控制系統 -- 從微觀到宏觀
by
Wen-Tien Chang
PPTX
GDG Taichung: Cloud Study Jam ML API
by
Duran Hsieh
PPTX
GitHub Action Introduction
by
Duran Hsieh
PDF
Github Actions
by
Weizhong Yang
PPTX
Git & git flow
by
Amo Wu
PDF
Git 版本控制 (使用教學)
by
Jui An Huang (黃瑞安)
PPTX
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
by
Edward Kuo
PPTX
使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)
by
Will Huang
PDF
Git tutorial for windows user (給 Windows user 的 Git 教學)
by
Cloud Tu
PPTX
Git & Sourcetree 介紹
by
Adison wu
PDF
OpenStack系列公开课2 -20130508
by
OpenCity Community
PPTX
開放原始碼 Ch2.1 app - oss - oss ide (ver1.2)
by
My own sweet home!
PDF
CocoaPods private repo
by
Weizhong Yang
Azure Web App on Linux @ Global Azure Bootcamp 2017 Taiwan
by
Will Huang
Angular 4 網站開發最佳實務 (Modern Web 2017)
by
Will Huang
工程師必備第一工具 - Git
by
Alan Tsai
Android 程式設計(4)
by
Roy Wang
Git 入門與實作
by
奕浦 郭
ALPHAhackathon: How to collaborate
by
Wen-Tien Chang
Xcode 的 git 版本管理
by
彼得潘 Pan
Git 版本控制系統 -- 從微觀到宏觀
by
Wen-Tien Chang
GDG Taichung: Cloud Study Jam ML API
by
Duran Hsieh
GitHub Action Introduction
by
Duran Hsieh
Github Actions
by
Weizhong Yang
Git & git flow
by
Amo Wu
Git 版本控制 (使用教學)
by
Jui An Huang (黃瑞安)
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
by
Edward Kuo
使用 Angular 2 與 Firebase 實現 Serverless 網站架構 (JSDC.tw 2016)
by
Will Huang
Git tutorial for windows user (給 Windows user 的 Git 教學)
by
Cloud Tu
Git & Sourcetree 介紹
by
Adison wu
OpenStack系列公开课2 -20130508
by
OpenCity Community
開放原始碼 Ch2.1 app - oss - oss ide (ver1.2)
by
My own sweet home!
CocoaPods private repo
by
Weizhong Yang
Similar to Intro to Git 投影片
PDF
Git in a nutshell
by
Nelson Tai
PDF
Introduction to git
by
Bo-Yi Wu
ODP
Git 教學
by
Ming-Sian Lin
ODP
Git 程式碼版本控制軟體介紹
by
PingLun Liao
PPTX
Git基礎介紹
by
Max Ma
PDF
Learning to Use Git | WeiYuan
by
Wei-Yuan Chang
PPTX
Git and git hub
by
唯 李
PPTX
Git入門介紹
by
mudream4869
PPTX
Git introduction
by
mythnc
PPTX
GIT實務操作與理論
by
鵬 大
PDF
如何與 Git 優雅地在樹上唱歌
by
Mu Chun Wang
PDF
Git Tutorial
by
Drake Huang
PPTX
Git & git hub v1.2
by
Chris Chen
PPT
Git 超簡單學習懶人包(軟體程式版本控管系統)
by
flylon
PDF
Git 入門與應用
by
Allen Chou
PDF
Yet another introduction to Git - from the bottom up
by
Wen-Tien Chang
PPTX
大家應該都要會的工具 Git 從放棄到會用1-基礎篇
by
Alan Tsai
PDF
Git 簡介(古時候的簡報備份)
by
Hsin-lin Cheng
PDF
初心者 Git 上手攻略
by
Lucien Lee
ODP
Git basis - usage
by
Eason Cao
Git in a nutshell
by
Nelson Tai
Introduction to git
by
Bo-Yi Wu
Git 教學
by
Ming-Sian Lin
Git 程式碼版本控制軟體介紹
by
PingLun Liao
Git基礎介紹
by
Max Ma
Learning to Use Git | WeiYuan
by
Wei-Yuan Chang
Git and git hub
by
唯 李
Git入門介紹
by
mudream4869
Git introduction
by
mythnc
GIT實務操作與理論
by
鵬 大
如何與 Git 優雅地在樹上唱歌
by
Mu Chun Wang
Git Tutorial
by
Drake Huang
Git & git hub v1.2
by
Chris Chen
Git 超簡單學習懶人包(軟體程式版本控管系統)
by
flylon
Git 入門與應用
by
Allen Chou
Yet another introduction to Git - from the bottom up
by
Wen-Tien Chang
大家應該都要會的工具 Git 從放棄到會用1-基礎篇
by
Alan Tsai
Git 簡介(古時候的簡報備份)
by
Hsin-lin Cheng
初心者 Git 上手攻略
by
Lucien Lee
Git basis - usage
by
Eason Cao
Intro to Git 投影片
1.
Intro to Git 2017.06.12
@ MentorMe
2.
Agenda • What and
Why Git • Git的核⼼心概念念 • How to install and use Git (SourceTree) • Best Practices • Q & A
3.
What is Git •
git: 混帳。KK ⾳音標念念 [gɪt], not [dʒɪt] • 作者為Linus Torvalds,核⼼心功能只花了了10天完成 • 原本Linux kernel使⽤用的BitKeeper VCS 在免費功能上加了了許多限制。找了了當時 市⾯面上的免費軟體,沒有他想要的功能。
4.
Why use Git? •
紀錄Snapshot (快照) ⽽而不是 Difference (差異異)
5.
• CVS /
SVN - Centralized repository 集中式資料庫 • 缺點:所有資料都在server,網路路很慢或server掛掉就沒辦法做事 • ⼤大部分操作都需要連到server • Git - Distributed repository 分散式資料庫 • 優點:所有資料都存在本機,server掛掉或網路路慢也能commit • ⽀支援非線性開發 (新增branch)、⼤大部分操作皆在本機完成 • 缺點:佔體積較⼤大
6.
檔案的三種狀狀態 • Modified :
已修改 • Staged : 已暫存 • Committed : 已提交
7.
工作流程: 1. 讀者修改⼯工作⽬目錄內的檔案。 2. 暫存檔案,將檔案的快照新增到暫 存區域。 3.
做提交的動作,這會讓存在暫存區 域的檔案快照永久地儲存在Git⽬目錄。
8.
•Repository: 可以想成是project,⼤大家⼀一起協作的地⽅方 •Branch: 這是Git強⼤大的地⽅方,可以任意在local開branch 各⾃自實做不同的功能到時候再merge回主branch •Commit
[名詞] : 每⼀一次的change就叫做⼀一個commit, 裡⾯面可以包含數個檔案改動 •Tag : 標⽰示milestone。使⽤用模式通常是release之後, 例例 如上了了v1.2.0到App Store or Production server, 就在 該commit下⼀一個tag "v1.2.0"
9.
• pull 下拉:
[remote -> local] 想成從遠端server把你所 在的branch的commits拉下來來 • commit 提交 [動詞] : [local] 在本地機器把這次的檔案 改動做成⼀一個commit • push 上推: [local -> remote] 把本地新的commit上到 server
10.
Install Git •(GUI Tool)
SourceTree •Command Style: •Windows - Install Git bash (https://git-for- windows.github.io/) •Mac - Install git (https://git-scm.com/download/ mac)
11.
Install & Setup SourceTree
12.
Basic Git commands •git
init -> 設定本機Git repository •git clone -> 從遠端抓repository回來來 •git pull -> 把本機沒有的commit抓回來來 •git commit & git push -> 提交 & 上傳到遠端repository •git checkout (create branch & switch branch) -> 切換branch •SourceTree實作
13.
Advanced Git commands •edit
.gitignore -> git 忽略略檔案 •git reset -> 切換commit •solve conflict •cherry pick •pull request
14.
Pull Request •⽤用來來達到code review的⽬目的: •可以針對code討論 •需要approved後才能被merge
15.
try.github.io 假如你有15分鐘
16.
你能想像這樣的協作.... 不⽤用版本控管?
18.
關於Branch的Best Practice
20.
• 主要分⽀支 • master:
永遠處在 production-ready 狀狀態 • develop: 最新的下次發佈開發狀狀態
21.
• ⽀支援性分⽀支 • Feature
branches: 開發新功能都從 develop 分⽀支出來來,完成後 merge 回 develop • Release branches: 準備要 release 的版本,只修 bugs。從 develop 分⽀支出 來來,完成後 merge 回 master 和 develop • Hotfix branches: 等不及 release 版本就必須⾺馬上修 master 趕上線的情況。 會從 master 分⽀支出來來,完成後 merge 回 master 和 develop • Debug branches: 修正某個issue的branch,完成後merge回develop
22.
• 也有⼀一個⼯工具叫做git flow實作上⾯面的best
practice: • https://ihower.tw/blog/archives/5140 • https://danielkummer.github.io/git-flow-cheatsheet/index.zh_TW.html • 本公司短暫⽤用過⼀一陣⼦子,但後來來被捨棄,因為不是所有的⼈人都有sense or 認 同。所以取得最⼤大公約數很重要。理理想但沒有⼈人會⽤用的規則 = 沒有規則。 • 原則:協作的⼈人離得越遠,就要有越嚴謹詳細的命名
23.
關於Branch Naming的 Best Practice
24.
• master branch:
master • develop branch: develop • release branch: release/1.0.0 • version name: (x.y.z) x = major, y = minor, z = build number
25.
• feature branch:
feature/132_signup • issue number + short description (我知道很難, 但是好的命名可以易易讀⼜又不 影響閱讀, 多想30秒可以幫別⼈人省下許多時間回查該issue是什什麼) • hotfix branch: hotfix/668_image_crash • debug branch: debug/322_save_error
26.
關於Commit的Best Practice
27.
• ⼀一天⼤大概有3 ~
4個commit是理理想的commit長度,太 長的commit很難抓bug • ⼀一個commit只包含在⼀一個issue範圍內的改動 • 同⼀一個issue number最好不要⼀一直出現在不同 commit中 (這表⽰示某⼀一個issue⼀一直沒解乾淨 or 寫 完)。除非該issue是超⼤大feature,但在這種情況 下,該要切ticket by RD, 因為只有他知道技術上怎 麼切才適合
28.
• Commit Comment:
https://chris.beams.io/posts/git-commit/ • 將標題與內容中間多⼀一⾏行行空⽩白 • 標題限制 50 字元 • 標題第⼀一個字必須為⼤大寫 • 標題最後不要帶上句句號 • 標題內容可以使⽤用強烈的語氣 • 內容請⽤用 72 字元來來斷⾏行行 • 內容可以解釋 what and why vs. how
29.
關於跟別⼈人協作開發的 Best Practice
30.
• 如果有跟其他⼈人協作的可能,記得每次做事之前先 pull code •
在push commit之前要⾃自⼰己先build過、跑起來來、測 過、再上 • 千萬不要在下班前(ex: 30 mins) commit & push (因 為你會忽略略上⼀一點) • 不要積⼀一⼤大堆commits⼀一直不push, 這樣會讓你的 code out of sync, 到時⼀一次解很多conflicts, 痛苦加 倍
31.
• 不要在Git Repository裡⾯面放任何的key
& Local settings • commit 標題最好加上issue number • 公司內部最好有⼈人可以review commit的內容,或是 要同意才能上code的機制 -> Pull Request
32.
• Jenkins •讓每次commit都做⾃自動 build
/ auto test •Jenkins也能接Fabric的Crashlytics,可以直接在 Jenkins介⾯面上點要release哪⼀一個branch的latest commit,就直接發布給QA測試 (iOS & Android)
33.
References • Pro Git
(中⽂文版) https://git-scm.com/book/zh-tw/v1 • ihower https://ihower.tw/git/
34.
課後互動
Download