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