ä¾åã©ã¤ãã©ãªãå©ç¨ããå ´åRubyGemsããCocoaPodsã¨ãã£ããã¼ã«ã§ä¸äºè§£æ±ºããã±ã¼ã¹ãã»ã¨ãã©ã ã¨æãã¾ããããã¾ã¼ã«Gitã«ä¸ãã£ã¦ããã©ã¤ãã©ãªãç´æ¥èªåã®ãªãã¸ããªã«è¿½å ããªãã¨ãããªãå ´åããã£ãããã¾ãã ãããã£ãæã«ä½¿ãGitã®ãµãã³ãã³ãããããã®ç¹å¾´ã¨ä½¿ãã©ãããã¾ã¨ãã¦ã¿ã¾ããã ä¸çªã¹ã¿ã³ãã¼ããªå¤é¨ãªãã¸ããªè¿½å æ¹æ³ã§ãããã¶ã大æµã®ä¾å管çã§ã¯ããã使ãã°ååã§ããããgit-submoduleãå©ç¨ããã¨ãå¤é¨ãªãã¸ããªã®ã³ã¼ãèªä½ã¯èªããã¸ã§ã¯ãã®ç®¡çä¸ã«åãè¾¼ã¾ããããªãã¸ããªã®ç¹å®ã³ãããã¸ã®åç §æ å ±ã®ã¿ãç»é²ããã¾ããå¤é¨ãªãã¸ããªã®commit hashã¸ã®ãã¤ã³ã¿ã追å ããããããªã¤ã¡ã¼ã¸ã§ãã $ git submodule add git@github.com:Alamofire/Alamofire.git $ git diff
ããã«ã¡ã¯ @sonots ã§ããä»åããã㯠git submodule ã®ä½¿ãã©ããã®ä¸ä¾ã¨ã㦠dotfiles (è¨å®ãã¡ã¤ã«)ã®ç®¡çã¸ã®å¿ç¨ãç´¹ä»ãã¦ã¿ããã¨æãã¾ãã ã¾ããã. dotfiles ã®ç®¡çã« git ã使ã èªåã® dotifles (è¨å®ãã¡ã¤ã«)ã github ã®ãªãã¸ããªã«ç»é²ãã¦ãæ°ããç°å¢ã§ã git clone ããã°ç°¡åã«ç°å¢æ§ç¯ã§ããããã«ãã¦ããæ¹ã£ã¦ãæè¿ã§ã¯ãã£ããããã£ãããã®ã§ã¯ãªãã§ããããï¼ããããç§ã
å ¨ææ¤ç´¢ã¨ã³ã¸ã³Groongaã¯mrubyãçµã¿è¾¼ãã§ãã¾ããçç±ã¯ãé度ã¯ããã»ã©å¿ è¦ã§ã¯ãªãè¾¼ã¿å ¥ã£ãå¦çãCã§ã¯ãªãRubyã§æ¸ããã¨éçºãæãããã§ãã ãã®è¨äºã§ã¯ã©ã®ããã«mrubyãçµã¿è¾¼ãã§ãããã«ã¤ãã¦ãã«ãå¨ãã ãã説æãã¾ããï¼ãã«ãå¨ã以å¤ã«ã¯ããã¤ã³ãã£ã³ã°ãã©ããã£ã¦æ¸ããã.rbãã¡ã¤ã«ãã©ãã«ç½®ãããå®è£ ãCã«ãããRubyã«ãããã®å¤æåºæºãªã©ã®è©±ãããã¾ããï¼ æ¹é mrubyã¯Rakeã使ã£ããã«ãã·ã¹ãã ã使ã£ã¦ãã¾ããGroongaã¯GNU Autotoolsã¾ãã¯CMakeã使ã£ããã«ãã·ã¹ãã ã使ã£ã¦ãã¾ããï¼ã©ã¡ãã§ããã«ãã§ãã¾ããï¼ mrubyã¯Rakeã使ã£ã¦ãã«ããGroongaã¯GNU Autotoolsã使ã£ã¦ãã«ããã¨ããã¨ã³ã³ãã¤ã«ãªãã·ã§ã³ã®çµ±ä¸ã»ã¯ãã¹ã³ã³ãã¤ã«ãããã§é¢åã«ãªãã¾ããã¾ããRakeã使ã£ã¦ãã«ãããããã«
ã¿ãªããgitã®submoduleã£ã¦ç解ãã¦ä½¿ã£ã¦ã¾ããï¼ è¦ªããã¸ã§ã¯ããpullããããsubmoduleãmodifiedã«ãªã£ã¦æ··ä¹±ãã¦git addãã¦...ãã°ã°ã°ã°ãã¿ãããªäºãªãã§ããï¼ ç§ã¯submoduleããªããªãç解ã§ããã«çµæ§è¦å´ãã¾ããã^^; ãã©ã³ãåä½ã§ç®¡çããé常ã®ãªãã¸ããªã¨éããsubmoduleã¯CommitIDåä½ã§ç®¡çããã¨ããã®ãä¸çªç解ãã«ããé¨åã ã¨æãã¾ãã ä»åã¯ãããã¸ã§ã¯ãã«submoduleã追å ãæ´æ°ãåé¤ã®åããæ´æ°ãæããå´ã®ããã¸ã§ã¯ãã¨æ´æ°ãåãå ¥ããå´ã®ããã¸ã§ã¯ãã®2ã¤ã®è¦ç¹ãã追ããªãããCommitIDã§ç®¡çããã¨ã¯ã©ãããäºãªã®ãã解説ãã¦ããã¾ãã (çµè«ã ãè¦ãã人ã¯æ«å°¾ã®ã¾ã¨ãã¸) æºå ãsubmoduleãéçºããå½¹å²ã®ããã¸ã§ã¯ã test_app_Aãã¨ãsubmoduleãåãå ¥ããå½¹å²ã®ã
ã¤ã³ã¿ã¼ãããã«ã¯ãGit submodule ã使ã£ã¦ã¯ ãããªã ã¨ããè¨äºãé£ã³äº¤ã£ã¦ãã¾ããç§ã¯ãããã®è¨äºãè¨ãã»ã©ã²ã©ããã®ã¨ã¯æã£ã¦ãã¾ãããããããã£ã主張ã大æ¹æ£ãããã¨ã¯èªãã¾ãã以åã®æ稿ã§ã説æãã¾ããããsubmodule ã¯å©ç¨ä¾¡å¤ã®ããã¦ã¼ã¹ã±ã¼ã¹ã¯å°ãªããéã«ããã¤ãã®æ¬ ç¹ãããã¾ãã ã§ã¯ãããã«ä»£ãããã®ã¯ããã®ã§ããããï¼ãçãã¯ããããã§ããGit ã®å©ç¨ã¯ç¶ãã¤ã¤ãããã¸ã§ã¯ãã«ãããã½ããã¦ã§ã¢ã®ä¾åé¢ä¿ã追跡ãããã¨ãã§ãããã¼ã«ã (å°ãªãã¨ã) äºã¤ããã¾ã : git subtree google repo ãã®è¨äºã§ã¯ãgit subtree ã«æ³¨ç®ããå®å ¨ã¨ã¾ã§ã¯ãããªããã®ã®ããã git submodule ã®åé¡ã解決ãããã®ã§ãããã¨ã説æãããã¨æãã¾ãã å®ä¾ã¨ãã¦ãã¤ãã®ç§ã®ã¦ã¼ã¹ã±ã¼ã¹ãåãä¸ãã¾ããèªåã® dotfi
ããµãã¤ã®ããã¸ã§ã¯ãã¯ããããå¥ã®ãã®ã¨ãã¦ç®¡çããããã ãã©ãä¸æ¹ãä»æ¹ã®ä¸é¨ã¨ãã¦ã使ããããGit â ãµãã¢ã¸ã¥ã¼ã«ã®åé ã«ããããã¾ãããã¾ãã«ããããããã¨æã£ã¦ããã®ã§ã¡ãã£ã¨æãåããã¦ã¿ã¾ãããä»ã¾ã§é¿ãã¦ããã®ã§ãã ãµãã¢ã¸ã¥ã¼ã«ã¨ã¯ ãµãã¢ã¸ã¥ã¼ã«ã¨ã¯ä¸»ãªç®¡ç対象ï¼ç®¡ç対象Aï¼ã«å¥ã®git管ç対象ï¼ç®¡ç対象Bï¼ã追å ãããã¨ã§ãããã ãã管ç対象Bã®ä¸èº«ã¾ã§ã¯ç®¡çãã¾ãããããã¾ã§ãã管ç対象Bã®ç¹å®ã®ã³ããããè¨é²ããã ãã§ãã ãµãã¢ã¸ã¥ã¼ã«ã®è¿½å $ git submodule add git://github.com/chneukirchen/rack.git rack ãããè¡ãã¨ã.gitsubmodulesã¨ãrackãAã®ç®¡ç対象ã«è¿½å ãããã $ cat .gitmodules [submodule "rack"] path = rack url
ããã«ã¡ã¯ã ä»åã¯å人çã«æåã¡ãã£ã¨æ±ãã¥ããã£ã git submodule ã«ã¤ãã¦åºæ¬çãªä½¿ãæ¹ãã¡ã¢ãã¦ããããã¨æãã¾ãã git submoduleã¯å¤é¨ã®gitãªãã¸ããªãèªåã®ãªãã¸ããªã®ãµããã£ã¬ã¯ããªã¨ãã¦æ±ããã¨ãã§ããããã«ãªããã®ã§ãã cloneããã«submoduleã¨ãããã¨ã§ã対象ã®ãªãã¸ããªãæ´æ°ãããã¨ãã追å¾ãããã¨ãå¯è½ã¨ãªãã¾ãã æåã¯ä½¿ãã¥ãããããåãããªãã£ãã®ã§cloneãã¦ã¾ããããæ £ããã¨ä¾¿å©ã§ãã ããã§ã¯ä½¿ãæ¹ãè¦ã¦ã¿ã¾ãããã ãµãã¢ã¸ã¥ã¼ã«ã®è¿½å ãµãã¢ã¸ã¥ã¼ã«ã¯ git submodule add ã³ãã³ãã§è¿½å åºæ¥ã¾ãã $ git submodule add <gitãªã³ã¯> 追å ããã¨ãGitãªãã¸ããªã®ã«ã¼ãã« .gitmodules ãä½æããã¾ãã ä¸èº«ãè¦ã¦ã¿ãã¨ã追å ãããªãã¸ããªã®ååããã¹ãè¨è¿°ãã
git submodule 使ãæ¹ ãµãã¢ã¸ã¥ã¼ã«ã«ã¤ã㦠ãµãã¢ã¸ã¥ã¼ã«ã¯å¤é¨ã®ãªãã¸ããªãã½ã¼ã¹ããªã¼ã®ãµããã£ã¬ã¯ããªã«åãè¾¼ãããã«ä½¿ç¨ããã ãªã¢ã¼ããªãã¸ããªã¨ã¯ç°ãªãï¼ãªã¢ã¼ããªãã¸ããªã¯ã½ã¼ã¹ããªã¼ã«åãè¾¼ããªãï¼ äºã¤ã®ããã¸ã§ã¯ãã®ãã¹ããªã¯å®å ¨ã«åããã¦ãã ãµãã¢ã¸ã¥ã¼ã«ã«å¯¾ãã¦ã¯ç·¨éã§ããªã å¤é¨ãªãã¸ããªã®ãã¹ããªãåãè¾¼ã¿ããå ´åã¯ããµãã¢ã¸ã¥ã¼ã«ã§ã¯ãªãsubtree merge strategy ã使ã ã¡ã¤ã³ãªãã¸ããªã¯ãµãã¢ã¸ã¥ã¼ã«ã®ãªãã¸ããªã®ããã³ããããåç §ãã¦ãã ãµãã¢ã¸ã¥ã¼ã«ã追å ãã <git://example.com/repo.git> ã ãµãã¢ã¸ã¥ã¼ã«ã¨ãã¦è¿½å ããã«ã¯ git submodule add git://example.com/repo.git git submodule add git://example.com/
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}