AS2017-《华为Git实践:工作模式创新,及多中心分布式架构 》-蒋鑫
2020-03-01 228浏览
- 1.ԅGitਫ᪢ ૡ֢ཛྷୗڠෛ҅݊ग़Ӿஞړୗຝ ᰎ ԅದํᴴݪل
- 2.
- 3.
- 4.蒋鑫 ங҈ܗஙמғgotgit҅http://www.worldhello.net‣ Git contributor (git clean -i, ...) ‣ Git l10n coordinator (https://github.com/git-l10n/git-po)‣ 《Git权lub》, 2011 (https://github.com/gotgit/gotgit)‣ 2005—2015L自雇佣L前一半时间vpSVNLe一半时间h 纠正这O错误 ‣ 2015.12 加入华P iSource g队 ๏ “ԣԣԣҘᬮฎᛔᎸҘ”
- 5.Git F3mily • Distributed; freedom; commit any where, any time • Geeky GiEHFb AoHeCedE:eH:oleoAen DoFCce 阿里 • Fork + Pull Request • Social coding • UI 腾讯 • Microsoft VSTS Google DEyle code CeGieH foC GiE • Sync of fork repos; waste of disk spaces Multi-repo management, git submodule? • • Review in Google style Multi-reposolution:repo • Project by project, not a platform ᪡ݶڊᨶᒋԩጱᕁၹ • Centralized, lack of freedom • Just for review, and the UI ḡفཛྷୗڠෛጱ᠗ၹ OMEGA
- 6.• Gitૡ֢ၞڠෛ • ग़ӾஞGitຝ
- 7.ړୗૡ֢ၞጱࢯಟ1ғ๐ۓᒒጱਂێؙܴ Fresh clone, and hard links clone ਂؙ After new push and GC ਂؙ
- 8.ړୗૡ֢ၞጱࢯಟ2ғਮಁᒒ֢ጱ॔ Boring procedure 4GXGTUG/GTIG4GSWGUV fork upstream Strange procedure How about topic branches? • slow down clone/fetch • loose references҅high IO • chaos of visibility of all refs origin upstream origin ࣈ git remote add upstream URL ࣈ How about 100 repos? git fetch upstream git rebase upstream/master git push -f origin HEAD fork Repo 1 Fork 1 fork Repo 2 Fork 2 ... ... fork Repo 100 Fork100
- 9.ړୗૡ֢ၞጱࢯಟ3ғग़ՙପىᘶ • Multiple repos in one project, why? ‣ GC, clone are quite slow for big repos; auth; micro services • git submoduleғᭇአࢱғՙପ҅ຂᘠݳ ‣ Recurisivesubmodules:ൈᬿ॔ጱፓ୯્ॺ ‣ Update of gitlinks. ᬴ๅෛ᩻ڹๅෛᳯ᷌ ‣ Conflict of gitlinks. ඪ೮پӡᎸ҅ݎᓌፗฎᅒᵙ • 2016ଙ҅iSourceӥጱӞӻᶱፓᥴᘠ҅20ৼՙಘीک1000ৼ ՙ... ...
- 10.No fork, no feature branch, and no submodules
- 11.OMEGA One-stop Multi-Endpoints Git Access git push --receive-pack=omega origin \HEAD:refs/for/target-branch/local-branchgitlab-shell (omegaғᚆܨᚆٟ) i/oFCce DC3fE meCge CeqFeDE API#1 API#2 GET /ssh-info POST merge-request API#3 API#4 POST super-mr GET super-mr/:id giE-CeceiGe-A3ck --omeg3 GiE HookD • • • omeg3-meCge-CeqFeDE omeg3-ACe-CeceiGe omeg3-AoDE-CeceiGe • No foCk ‣ ‣ CCe3Ee -R MR byAFD:‣ /Aeci3lCefeCeneD:DC3fE mode -R MR • No fe3EFCebC3nc:CefD meCgeD 123 :e3d • No DFbmodFleD ‣ ‣ M3nifeDE CeAo 3nd 1MLgiE-mm:CeHCiEe CeAo in gol3ng foC OMEGA
- 12.OMEGAཛྷୗ֢ᐏֺ git push originHEAD:refs/for/master/my/topic1'>HEAD:refs/for/master/my/topic1