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.6k
git subtree 替代 git submodule
git subtree 替代 git submodule
cloudsben
July 24, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
快速入門可觀測性
blueswen
0
350
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
180
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
540
Go の GC の不得意な部分を克服したい
taiyow
3
780
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
190
Beyond ORM
77web
5
660
Haze - Real time background blurring
chrisbanes
1
510
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
930
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Making Projects Easy
brettharned
116
5.9k
Statistics for Hackers
jakevdp
796
220k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
A Tale of Four Properties
chriscoyier
157
23k
KATA
mclloyd
29
14k
A designer walks into a library…
pauljervisheath
204
24k
What's in a price? How to price your products and services
michaelherold
243
12k
Unsuck your backbone
ammeep
669
57k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
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