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.7k
git subtree 替代 git submodule
git subtree 替代 git submodule
cloudsben
July 24, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
Datadog Workflow Automation で圧倒的価値提供
showwin
1
170
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
260
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
520
5分で理解する SOLID 原則 #phpcon_nagoya
shogogg
1
310
SwiftUI Viewの責務分離
elmetal
PRO
2
270
Generating OpenAPI schema from serializers throughout the Rails stack - Kyobashi.rb #5
envek
1
390
Rails アプリ地図考 Flush Cut
makicamel
1
130
Unity Android XR入門
sakutama_11
0
180
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
150
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
230
たのしいSocketのしくみ / Socket Under a Microscope
coe401_
8
1.3k
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
920
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Faster Mobile Websites
deanohume
306
31k
Done Done
chrislema
182
16k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Scaling GitHub
holman
459
140k
For a Future-Friendly Web
brad_frost
176
9.6k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
A designer walks into a library…
pauljervisheath
205
24k
Designing Experiences People Love
moore
140
23k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
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