Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
版本控管了沒? Coders 必備!
Search
Tom Chen
May 05, 2021
Programming
0
39
版本控管了沒? Coders 必備!
Taipei Creative Coders #8
版本控管了沒? Coders 必備!
一個非常粗略的版本控管工具介紹
Tom Chen
May 05, 2021
Tweet
Share
Other Decks in Programming
See All in Programming
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
870
datadog dash 2025 LLM observability for reliability and stability
ivry_presentationmaterials
0
190
Create a website using Spatial Web
akkeylab
0
310
XP, Testing and ninja testing
m_seki
3
220
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.4k
VS Code Update for GitHub Copilot
74th
1
480
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
100
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
110
童醫院敏捷轉型的實踐經驗
cclai999
0
200
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
600
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
410
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
170
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
4 Signs Your Business is Dying
shpigford
184
22k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Practical Orchestrator
shlominoach
188
11k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
What's in a price? How to price your products and services
michaelherold
246
12k
Building Adaptive Systems
keathley
43
2.6k
Transcript
Tom Chen 2021/5/5 版本控制了沒? Coders 必備! Taipei creative coders Meetup
#8
今天是⼀個超級粗略的介紹
主要是希望還沒在⽤的⼈可以開始
我不會在這邊跟⼤家過指令
Source Control CVS Subversion (svn) Perforce (p4) StarTeam Git Mercurial
(hg) Plastic SCM
有什麼好處?
清楚每⼀次做了哪些 更動 - ⽅便回復 - Debug - 記錄⼯時 - 協作
- Code Review https://github.com/yychen/dj-registry/commits/master
基本概念 Working Directory Staging Area Repository ⽬前的⼯作⽬錄 暫存區域 儲存庫 sketch.js
README.md ⿊⾊:Untracked Files (未追蹤)
基本概念 Working Directory Staging Area Repository ⽬前的⼯作⽬錄 暫存區域 儲存庫 sketch.js
README.md 藍⾊:Staged Files (暫存區) sketch.js README.md git add
基本概念 Working Directory Staging Area Repository ⽬前的⼯作⽬錄 暫存區域 儲存庫 sketch.js
README.md 綠⾊:Committed Files (已存入) sketch.js README.md git commit sketch.js README.md 46a1c361
基本概念 Working Directory Staging Area Repository ⽬前的⼯作⽬錄 暫存區域 儲存庫 sketch.js
README.md 紅⾊:有更動 ⿊⾊:Untracked Files (未追蹤) 綠⾊:Committed Files (已存入) sketch.js README.md 46a1c361 logo.png
基本概念 Working Directory Staging Area Repository ⽬前的⼯作⽬錄 暫存區域 儲存庫 sketch.js
README.md 藍⾊:Staged Files (暫存區) 綠⾊:Committed Files (已存入) sketch.js README.md 46a1c361 logo.png sketch.js logo.png git add
基本概念 Working Directory Staging Area Repository ⽬前的⼯作⽬錄 暫存區域 儲存庫 sketch.js
README.md 藍⾊:Staged Files (暫存區) 綠⾊:Committed Files (已存入) sketch.js README.md 46a1c361 logo.png git commit sketch.js logo.png sketch.js logo.png ad1eec42 README.md
基本概念 Working Directory Staging Area Repository ⽬前的⼯作⽬錄 暫存區域 儲存庫 sketch.js
README.md sketch.js 46a1c361 logo.png git push sketch.js logo.png ad1eec42 README.md Repository GitHub
基本概念 Working Directory Staging Area Repository ⽬前的⼯作⽬錄 暫存區域 儲存庫 sketch.js
README.md sketch.js 46a1c361 logo.png git pull sketch.js logo.png ad1eec42 README.md Repository GitHub
基本概念 Working Directory Staging Area Repository ⽬前的⼯作⽬錄 暫存區域 儲存庫 sketch.js
README.md sketch.js 46a1c361 logo.png git pull sketch.js logo.png ad1eec42 README.md Repository GitHub Merge Con fl ict
養成好習慣
不要⼀⼝氣加 (整個⽬錄) git add . 除非你很清楚你加了什麼
看清楚加了什麼 git status
今天的範例在 https://github.com/yychen/tcc-git-django-sample
None
None
看清楚加了什麼 git diff
None
⾦鑰、密碼千萬不要進
這種東⻄進去了 無比的⿇煩
進了怎麼辦? https://docs.github.com/en/github/authenticating-to-github/removing-sensitive-data-from-a-repository
看清楚加了什麼 git status
看清楚加了什麼 git diff
每次加,都清楚加了什麼 git commit 對⾃⼰進的 code 負責
也不要進被產⽣出來的檔案 build、.exe、xxx_Data、.dll .DS_Store、thumbs.db .vscode (?) 原則上 https://stackover fl ow.com/questions/32964920/should-i-commit-the-vscode-folder-to-source-control
你的儲存庫 (repository) 原則上 存放最終可產⽣、執⾏的原始碼 以及相關⽂件
None
換句話說 某君從儲存庫拉下來⼀整包 就要可以從這⼀包東⻄ 產⽣出⼀個⼀樣的可執⾏的東⻄ 包含說明⽂件、如何把建制的環境建立起來、測試... 等資訊
.gitignore
多久 commit ⼀次? https://softwareengineering.stackexchange.com/questions/74764/how-often-should-i-do-you-make-commits
commit message 怎麼寫 • https://chris.beams.io/posts/git-commit/ • https://hackmd.io/@yenWu/HJQk5dt2x?type=view (中⽂版) • https://wiki.openstack.org/wiki/GitCommitMessages
Git LFS 那些超⼤張的圖檔、.PSD、聲⾳檔、所有影片相關的、.abc、非⽂字檔...
A Successful Git branching model https://nvie.com/posts/a-successful-git-branching-model/ Branch
協同合作 • https://github.com/pycontw/pycon.tw/pull/800 • https://github.com/pycontw/pycon.tw/pull/921 • https://github.com/pycontw/pycon.tw/pull/884 • https://github.com/pycontw/pycon.tw/pull/885 Issue
/ Merge Request (Pull Request) / Review
Any questions?