$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
版本控管了沒? Coders 必備!
Search
Tom Chen
May 05, 2021
Programming
0
40
版本控管了沒? Coders 必備!
Taipei Creative Coders #8
版本控管了沒? Coders 必備!
一個非常粗略的版本控管工具介紹
Tom Chen
May 05, 2021
Tweet
Share
Other Decks in Programming
See All in Programming
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
170
認証・認可の基本を学ぼう後編
kouyuume
0
240
AIコーディングエージェント(Manus)
kondai24
0
190
Cell-Based Architecture
larchanjo
0
130
Microservices rules: What good looks like
cer
PRO
0
1.4k
ゲームの物理 剛体編
fadis
0
350
TestingOsaka6_Ozono
o3
0
160
開発に寄りそう自動テストの実現
goyoki
2
1k
AWS CDKの推しポイントN選
akihisaikeda
1
240
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
320
エディターってAIで操作できるんだぜ
kis9a
0
730
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
4
880
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
39k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
GitHub's CSS Performance
jonrohan
1032
470k
Designing Experiences People Love
moore
143
24k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Building Adaptive Systems
keathley
44
2.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Statistics for Hackers
jakevdp
799
230k
Fireside Chat
paigeccino
41
3.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
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?