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
14
3.9k
git subtree 替代 git submodule
git subtree 替代 git submodule
cloudsben
July 24, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
140
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
220
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
130
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
13
7.7k
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
1
110
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
140
Event Storming
hschwentner
3
1.3k
Raku Raku Notion 20260128
hareyakayuruyaka
0
430
ぼくの開発環境2026
yuzneri
1
290
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
320
Ruby x Terminal
a_matsuda
5
560
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
240
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
430
4 Signs Your Business is Dying
shpigford
187
22k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
200
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
The agentic SEO stack - context over prompts
schlessera
0
680
Building an army of robots
kneath
306
46k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
340
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
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