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
git subtree 替代 git submodule
Search
cloudsben
July 24, 2013
Programming
3.9k
14
Share
git subtree 替代 git submodule
git subtree 替代 git submodule
cloudsben
July 24, 2013
Other Decks in Programming
See All in Programming
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.5k
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
450
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
360
Back to the roots of date
jinroq
0
480
AI-DLC Deep Dive
yuukiyo
9
4.8k
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
280
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
130
AIと共に生きる技術選定 2026
sgash708
0
110
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
840
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
490
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
240
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
620
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
エンジニアに許された特別な時間の終わり
watany
106
240k
Bash Introduction
62gerente
615
210k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
210
Designing for Performance
lara
611
70k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
330
Everyday Curiosity
cassininazir
0
200
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
200
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Transcript
git subtree ڗ -@cloudsben
git submodule Ҹ许ଖଞత仓库ࢦఆҰcommitቕೖ仓库తࢠ录
git subtree ସgit submodule ໋ྩ, ߹ኂࢠ仓库౸项தኂ์ࡏࢠ录
为ॄ㜮ཁ༻git subtree • ཧߋ৽ྲྀఔൺ较ํศ • git v1.5.2Ҏݐ议༻git subtree (git v1.7.11
࠽߹ኂ进དྷ) • 仓库 cloneԼདྷෆधཁ init update • ෆձ产ੜ૾ .gitmodule 㜎ࣅతจ݅ • git submodule 删আىདྷൺ较费劲 • 㠥֎还༗Ұࠣ团队协࡞时త尴䭾问题
༻ git subtree ձ۰౸ॄ㜮 • 㟬ಘֶձgit subtree৽త߹ኂํ໋ࣜྩ • 给ࢠ仓库贡ݙ码༗ൟ琐
Կ༻git subtree • git subtree -h • 䈀简ํࣜ • ී௨ํࣜ
• ೋṧํࣜ
䈀简ํࣜ • ఴՃࢠ仓库 git subtree add --prefix=lib 仓库 ᅿ ࢧ
--squash • ߋ৽ git subtree pull --prefix=lib 仓库ᅿ ࢧ --squash • 这䝅ํࣜ㭕༻༩༻ଖଞ仓库码,ෆpush 码ํࣜ ,ୠੋ᠍बੋ໋ྩ༗⻓长
ී௨ํࣜ • ఴՃ远ఔࢧ git remote add -f ࢧ໊ ࢠ仓库 •
git subtree add --prefix=lib2 远ఔࢧ ࢧ --squash • ߋ৽仓库 git fetch 远ఔࢧ ࢧ , git subtree pull -- prefix=lib2 远ఔࢧ ࢧ --squash • push ౸ࢠ仓库码 git subtree push --prefix=lib2 sub2 master
ೋṧํࣜ • टઌղ释为ॄ㜮ੋೋṧํࣜ, ༗git subtree 为ॄ㜮ෆ༻ ? • ఴՃ远ఔࢧ git
remote add -f ࢧ໊ ࢠ仓库 • git merge -s ours --no-commit 远ఔࢧ/master (-s ours දࣔ fetch ଖଞ远ఔࢧ头৴ଉԼདྷ,ୠੋෆվ变લࢧঢ়态) • git read-tree --prefix=lib -u 远ఔࢧ/master • git commit -m '' • git pull -s subree 远ఔࢧ master
THANK YOU @cloudsben cloudsben.com