Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Git Branch
Search
高見龍
June 04, 2018
Technology
430
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git Branch
Git 小聚:Git 跟你想的不一樣(Part 1)
高見龍
June 04, 2018
More Decks by 高見龍
See All by 高見龍
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
670
自己的售票系統自己做!
eddie
0
710
AI Agent 時代的開發者生存指南
eddie
4
2.9k
print("Hello, World")
eddie
2
700
為你自己學 Python - 冷知識篇
eddie
1
520
為你自己學 Python
eddie
0
820
Generative AI 年會小聚 - AI 教我寫程式
eddie
0
270
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
820
AI 時代的程式語言學習法
eddie
0
320
Other Decks in Technology
See All in Technology
20260930_Gemma4_Hands-on
tsho
0
210
[2026 Oracle Technical Deep Dive] AI時代のデータベース基盤をどう選ぶ? Exadata Database Serviceの選択肢と使い分け (2026年9月17日開催)
oracle4engineer
PRO
0
150
10年欲しかった音楽管理アプリを、AIと一緒に作りはじめた
judau
1
200
Meet AgentCore Identity Consent Portal
hironobuiga
3
150
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
370
Codex概要
ymiya55
0
170
KanaAI
shreyas1009
0
140
spanner-autoscalerに学ぶ CRD設計パターン 〜自動化と緊急時対応を両立する Kubernetesコントローラーの作り方〜
tkuchiki
0
220
Incremental HTTP
kazuho
5
1.9k
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
640
TiDBファミリーにDWHが新登場!! TiDB最新情報 / TiDB update 202609
yoshiakiyamasaki
0
180
3人で1000GPU超を統合運用する?マルチクラウド&オンプレを跨ぐ、構築と運用のリアル!
kazukun0716
2
800
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
A Soul's Torment
seathinner
8
3.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Scaling GitHub
holman
464
140k
Making the Leap to Tech Lead
cromwellryan
135
10k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
850
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Practical Orchestrator
shlominoach
192
12k
Transcript
(JU᪑你తෆҰᒬ 高見龍 1BSUࢧ
ൣྫ檔Ҋ https://bit.ly/2IQEwUR
ࣗզհ
a.k.a Eddie 愛現! 喜歡冷門的玩具 Ruby/Rails/iOS app 開發者、講師 Ruby 技術推廣、教育、諮詢 台灣、日本等國內外
Ruby 技術研討會講者 目前於五倍紅寶石擔任紅寶石鑑定商職務 部落格:https://kaochenlong.com 高見龍 photo by Eddie @eddiekao
發售中! https://railsbook.tw/
發售中! https://gitbook.tw/
։࢝೭લ
༗ᔒ༗ୈҰ࣍ᡒա (JUṜࡾݸࣈతਓ
https://gitbook.tw/
࡞্༗ࡏ༻(JUɼୠ ༗(JUᙛ'51ࡏ༻ʁ
ိݯɿIUUQTYLDEDPN ʮṜबੋ(JUɼሏ༻Ұछඬ྄ తࢄࣜᅷܕཧܕతٕज़ိ ᪦զ၇ሢҊత㚎༰ʯ ʮࠅʂṜཁዎኄ༻ʁʯ ʮෆಓɼେ֓बੋهҰࠣऴػ ࢦྩ ɼ ࢦྩᏏҰᏏ䈕Ҋब။ಉ㑊ྃ ɻ
Ռᚙੜɼઌ䈕Ҋઌඋ㟨Ұ 㟨౸ผతํɼሢҊ䜤ᎃɼવޙ ॏ৽ԼࡌҰ㟨શ৽తሢҊबߦྃ ɻ ʯ
ຊจ։࢝
൛ຊ߇੍ 7FSTJPO$POUSPM
! 那個...你有聽過 Git 嗎? 那是什麼? " 啊就一種分散式的版本控制系統啊! # 分散? 版本?
? ? ? ?
ॄኄ൛ຊ ཁ߇੍ॄኄ
ॴҎɼॄኄੋʮ൛ຊʯ
版本2 版本3 版本4 版本5 版本1 2016/2/8 2016/2/10 2016/5/8 2016/8/22 2016/11/28
ࢄࣜ
$ Sherly " Eddie % Emily & Picasso Octocat 我做好三角
型囉! 我改了兩個 圈圈! 收到! 收到! 收到! 我刪了一個 方塊! OK, 好! OK, 好!
උ份 ब૾؝༡ፍత࣌ީ။Ṷଘ༡ፍਐҰᒬ
㑖࢙ل㑚ٴᨽᎦ ग़ࣄత࣌ީ你။ಓੋኺॄኄ࣌ީ։࢝ब༗ɼ Ҏٴಓ֘ፙ୭ိഃ
$PODVSSFOU7FSTJPOT4ZTUFN $74 TJODF
4VCWFSTJPO 47/
ੋ
Ռᔒ༗࿏ɼ҃ੋ47/త ثނোత࣌ީศແ๏༻
ᔒ༗࿏बෆೳሜDPEFʁ (JU)VCᆦᎃత࣌ީେՈ။։؝সత說ՄҎԼ൝ྃ 哈囉, 你好!
(JU
-JOVT5PSWBMET GPSNBOBHJOH-JOVYLFSOFM TPVSDFDPEFJO photo by Krd
Ұఆཁ༻ऴػࢦྩ嗎
None
ࢧ #SBODI
ሣࢧతޡղ 你૾தతࢧॄኄᒬࢠ
photo by Mark Fischer
photo by Caroline
ࢧੋҰு షࡏݸ$PNNJU্తషࢴ
ࢧศٓత ҝॄኄ
ॄኄ࣌ީཁ༻ࢧ
৽⃧ࢧDBU $ git branch cat ᒾࢹࢧ $ git branch cat
* master $ git branch -d cat Deleted branch cat (was cb96971). ႟আࢧDBU
౸DBUࢧ $ git checkout cat ౸EPHࢧɼՌ֘ࢧෆଘࡏɼ ။ࣗಈݐཱ৽తࢧ $ git checkout
-b dog
߹ซࢧ
ଖመࢧੋᔒ辦๏߹ซత 你߹ซతੋࢧॴࢦ౸త$PNNJU
߹ซࢧDBU $ git checkout master $ git merge cat
߹ซաతࢧՄҎ႟ᎃ嗎
ཁዎኄऔফ߶߶Ṝ࣍త߹ซ 㐫گ
զ༗ࠣਓతࢧ༗ىိ૾ ࢧతʮখࣖ朵ʯઢᅷɼዎኄ զతࢧᔒ༗ 就是這種東西 㐫گ
Ҽҝෆधཁ啊ʂ
$ git merge cat --no-ff ඇշ߹ซ 'BTI'PSXBSE
ᚙੜিಥ $POqJDU ྃɼዎኄ辦 㐫گ
༻3FCBTF߹ซ
photo by UGA College of Ag & Environmental Sciences
e076c8 35c42e b43d89 f17acb 76ccce 981ad3 dog cat master HEAD
$ 3FCBTF߹ซ
35c42e 76ccce 981ad3 dog master b43d89 f17acb cat HEAD $
git rebase dog 3FCBTF߹ซ
f17acb b43d89 35c42e 76ccce 981ad3 dog master b43d89 f17acb cat
HEAD $ git rebase dog c871e3 ab12cd cat HEAD 3FCBTF߹ซ
3FCBTFෆੋႩԼష্
ཁዎኄऔফ ߶߶Ṝ࣍తSFCBTF߹ซ 㐫گ
ଖሏৗݟ㐫گ
༗ࠣൺֱػີత檔Ҋզෆ์ࡏ (JUཫ໘Ұىඋ份 㐫گ
HJUJHOPSF https://github.com/github/gitignore
你ෆখ৺ாᥒີᛰሜࡏݸ檔 Ҋཫɼఏަࣕਪग़ڈྃ 㐫گ
$ git filter-branch --tree-filter "rm -f config/password.txt" ሣ㑌ݸઅᴍ႟আಛఆ檔Ҋ
ਫ਼ਆෆɼෆখ৺༌ೖྃHJU SFTFU)&"%?IBSEࢦྩɼ檔 Ҋؐٹಘճိ嗎 㐫گ
ௐ閱SFqPH $ git reflog $ git reset --hard 823520ed ճ౸SFTFU೭લతઅᴍ
લҰఱᔒਭɼෆখ৺ؐᔒ߹ ซతࢧ႟ᎃྃɼٹಘճိ嗎 㐫گ
ௐ閱SFqPH $ git reflog $ git checkout -b new_branch_name 823520ed
༻ಹݸઅᴍ၏ग़৽తCSBODI
ҝॄኄ༗࣌ީ။ਪෆ্ڈʁ
ख䳾ଠຫ
ຊိෆ༻ Ṝটతʂ
ߋଟ㐫گɼჩ閱 IUUQTHJUCPPLUX
⾼高⾒見見龍 Blog Facebook Twitter Email Mobile https://kaochenlong.com https://www.facebook.com/eddiekao https://twitter.com/eddiekao
[email protected]
+886-928-617-687
(JUখঞ
ଘეҬ 4UBHJOH"SFB ࡞㑚 8PSLJOH%JSFDUPSZ Ṷଘݿ ຊ 3FQPTJUPSZ HJUBEE HJUDPNNJU
HJUQVTI HJUQVMM HJUSFTFU HJUSNDBDIFE Ṷଘݿ ԕ 3FQPTJUPSZ
暫存區域 Staging Area 工作目錄 Working Directory 儲存庫(本地) Repository git add
git commit git reset git rm --cached 儲存庫(遠端) Repository git push git pull $ git config --global user.name "5xruby" $ git config --global user.email "
[email protected]
" 設定: $ git init 初始化: $ git add FILENAME 把檔案加到暫存區域: $ git status 查看狀態: $ git commit -m "add index.html" 提交: $ git log 檢視紀錄: $ git reset HEAD^ 取消最後一次提交: $ git branch 5xruby 新增分支 "5xruby": $ git branch 檢視目前分支: $ git branch -d 5xruby 刪除已合併分支 "5xruby": $ git checkout 5xruby 切換分支到 "5xruby" : $ git merge 5xruby 合併分支 "5xruby": $ git remote add origin REMOTE_URL 新增遠端節點 "origin": $ git remote -v 檢視遠端節點: $ git remote rm origin 刪除遠端節點 "origin": $ git push origin master 把 "master" 分支內容推往 "origin" 節點: $ git pull origin master 把遠端 "origin" 節點的 "master" 拉回本機並進行合併: