第ä¸å GitHub Kaigi ã§çºè¡¨ããè³æã§ãã
ãã®ããã¥ã¡ã³ãã¯Â git.git (訳注: Gitããã¸ã§ã¯ãã®gitãªãã¸ããª) ããèªèº«ã§ä½¿ããã¦ããã¯ã¼ã¯ããã¼ã®è¦ç´ ãæ¸ãã¨ãã ããã使ãããã¨æããããã¨ãæå³ãã¦ãã¾ãã å¤ãã®ã¢ã¤ãã¢ãä¸è¬ã«é©ç¨ã§ãã¾ããã ããå°äººæ°ãåå ããå°ããªããã¸ã§ã¯ã㧠å®å ¨ãªã¯ã¼ã¯ããã¼ãå¿ è¦ã¨ããã®ã¯ç¨ã§ãã ç§ãã¡ã¯ã¯ã¤ãã¯ãªãã¡ã¬ã³ã¹ã®ããã«ã²ã¨ã¾ã¨ã¾ãã®Â ã«ã¼ã«Â ãã¨ãã¾ã¨ãã æç« ã§ããããã®ã«ã¼ã«ã¸ã®åæ©ãä¸ãã¾ãã è¨èéãã«ã¨ããªãããã«ãã¦ãã ãã; éè¦ãã¹ããªã®ã¯ããã®ææ¸ã®ãããªmanãã¼ã¸ã®è¨è¿°ããã ããªãããããã¹ãçç±ã®æ¹ã§ãã
Git ã«å梱ããã¦ãã contrib/diff-highlight ã使ãã¾ãã ãã¨ã¯ README ã«æ¸ãã¦ãããã¨ã®å¼ãåãã§ãããPATH ã®éã£ããã£ã¬ã¯ããªã«ç½®ãã¦ã~/.gitconfig ã«ä»¥ä¸ã®ããã«è¨å®ãæ¸ãã [pager] log = diff-highlight | less show = diff-highlight | less diff = diff-highlight | less ããã¨ã対å¿ããã³ãã³ãã®åºåããããªé¢¨ã«ãªãã¾ãã è¡ã¬ãã«ã® diff ã«å ãã¦ãåèªã¬ãã«ã§ã® diff ããã¤ã©ã¤ããããGitHub ã§ã® diff ã®ããã«æç»ããã¾ããã çµã¿è¾¼ã¿ã®ãªãã·ã§ã³ã§ --color-words ã¨ããã®ãããã¾ããããã¡ãã使ãã¨è¡ã¬ãã«ã® diff æ å ±ã失ãããã®ã§ãå°ãä¸ä¾¿ã ã£ãããã§ãããã¨ãã¹ã¦ README ã«æ¸ãã¦ã
Re: [git pull] drm-next Linus Torvalds Sun, 29 Mar 2009 14:48:18 -0700 (訳注 : Daveã®rebaseã®ããæ¹ã好ã¿ã§ãªãã¨ããLinusã«å¯¾ãã¦) > 2009å¹´5æ29æ¥(æ¥ææ¥) Dave Airlieã®çºè¨ > > ä»ããèªåããããã¨ãã¦ããã®ã¯ãç´ç·ãããªãããªã¼ãéããã¨ãã¦ããã ãã ã > ããããèªåã®æ¬¡ã®ããªã¼ã«ãã¼ã¸ããæã¯ãã¤ã§ããããã«ãããããããã ã > èªåã¯ãEricã®ããªã¼ãèªåã®ããªã¼ã«ç´æ¥ãã«ãã¦ããã®çµæãéããã¨ãã¦ããã > ããããªãã¼ã¸å±¥æ´ã«ã¤ãã¦æ³¨æãã¦ããã¨ã¯æã£ã¦ãããã©ãåã«è¨ã£ãããã«ã > ã«ã¼ãã«ããªã¼ã«é¢ãã¦ã®ããã¥ã¡ã³ããä½ããªãç¶æ ã§ã¯ãåãã©ããããã®ã > æ¬å½ã®ã¨ããã¯ä»ã®ä»ã¾ã§åãããªããã èªåãæ±ãã¦ããã®ã¯ãããããªå±¥æ´ã ãã§ãããã
Git ã®æåã«å¤ãªã¨ãããè¦ã¤ããã®ã§ãããããä½ã£ã¦ Git ã®ã¡ã¼ãªã³ã°ãªã¹ãã«æãã¦ã¿ãã¨ãããä½åº¦ãã®ã¬ãã¥ã¼ãçµã¦ãç¡äºã«åãè¾¼ã¾ããã Git ã«è²¢ç®ããã人ã¨ãããªã¼ãã³ã½ã¼ã¹éçºã®æµãã«èå³ããã人ãããã ãããããä½æ¥ã®æµããæ¸ãã¦ãããã¨ã«ããã 1. ãã°ãçºè¦ãã ä½ã¯ã¨ããããä¿®æ£ãããã¨ãããè¦ã¤ããã¨ããããã å æ¥ãgit difftool --dir-diff ã便å©ããã¦æ³£ãããã§ã ã¨ããè¨äºãæ¸ããããdifftool --dir-diff ã®æåã調ã¹ã¦ãããã¡ã«ãä¸æãã¡ã¤ã«æ¸ãæ»ãæ¡ä»¶ãå¤ãªãã¨ã«æ°ã¥ããã æå ã®ãã¼ã¸ã§ã³ãå¤ãã®ãã¨ãæã£ãããmaster ãã©ã³ãã§ãåç¾ããã®ã§ãã¡ãã£ããæ·±å ¥ããã¦ã¿ããgit difftool 㯠Perl ã¹ã¯ãªããã ã£ãã®ã§ãã½ã¼ã¹ã³ã¼ãã« print ã追å ãã¤ã¤æåãæ¢ã£ã¦ãã£ãããã°ãã調
ä»ãã½ã¼ã¹ã³ã¼ã管çã·ã¹ãã ã®æ¨æºã¨ãªã£ã¦ãããGitãï¼é¢é£è¨äºï¼ãä½è ã®Linus Torvaldsæ°ããæåãããã¡ã³ããã¼ã¨ãã¦è²¬ä»»ãè² ã£ã¦ããã®ãç¾å¨ç±³å½ã®Googleæ¬ç¤¾ã«å¤åãã濱éç´æ°ã ã濱éæ°ã«ãã¡ã³ããã¼ãå¼ãç¶ãã çµç·¯ãGoogleã§ã®ä»äºãªã©ã«ã¤ãã¦èããã Gitã³ãã¥ããã£ã¯ã©ã®ããã«æ´»åãã¦ããã®ã§ããã æ¬ä½ã®éçºã¯ããã¶ã¤ã³ããã³ã¼ãã¬ãã¥ã¼ã¾ã§ããã¹ã¦Gitã¡ã¼ãªã³ã°ãªã¹ãã§è¡ã£ã¦ãã¾ããæè¿ã®ãªãªã¼ã¹ã«ã¯ããããã60人ãã80人ç¨ã«ããå¤æ´ãå ¥ã£ã¦ãã¾ããã常ã«æ´»åãã¦ãã主è¦ãªéçºã³ãã¥ããã£åå è ãã¨è¨ããã®ã¯10人ç¨åº¦ã§ãã éçºè ã§ãªã人ãã¡ã§#git IRCãã£ãã«ã¨ããstackoverflowãªã©ã§ã¨ã³ãã¦ã¼ã¶ã¼ã®ãµãã¼ãããã¦ããã人ãã¡ã®æ°ã¯ãã£ã¨å¤ãã¨æãã¾ãããã®äººãã¡ããGitã³ãã¥ããã£ã®éè¦ãªä»²éã§ãã Gitã³ãã¥ããã£
以ågitã§ä¸åº¦è¡ã£ãå¤æ´ããªãã£ããã¨ã«ããæ¹æ³4ã¤ãç´¹ä»ãã¾ãããã æ¥å¸¸çã« git ã使ç¨ãã¦ããã¨ä»ã«ãæ§ã 㪠ããªãã£ããã¨ã«ãããããå ã«æ»ãããã ã¨ããç¶æ³ã«ééãã¾ãã ãã®ã²ã¨ã¤ã²ã¨ã¤ã«ã¤ãã¦å¯¾å¦æ¹æ³ãç´¹ä»ãã¦ããã¾ãã ç®æ¬¡ åé¡1: ã©ã¤ãã©ãªã®æ°æ©è½ã試ãããã«ããããé©å½ãªã³ã¼ããæ¸ãã¦ã¿ããã§ãããè¦ããªããåé¡2: ãããã¯ãã©ã³ãããã¼ã¸ãããã©å®ã¯ã¾ã ä¸å®å ¨ã ã£ãããã¼ã¸ãããç´ããããåé¡3: ãªãªã¼ã¹å¾ã«çºè¦ãããã°ãåå ã¯30æ¥åã«èªåãè¡ã£ãã³ãããã ã£ãããªãã£ããã¨ã«ããããåé¡4: æ°ããã³ããããããã¨ãã¦ééãã¦git commit âamendã§æ¸ãæãã¦ãã¾ã£ããå ã«æ»ããããåé¡5: è²ã ä½æ¥ãã¦ãããä½æ¥ãã£ã¬ã¯ããªã®å 容ãæ··æ²ã¨ãã¦ãããä¸åº¦ç¶ºéºãªç¶æ ã«ããããåé¡6: ä½æ¥ãã£ã¬ã¯ããªã«ã´ããã¡ã¤ã«ãæºã¾ã£ã¦ãããä¸åº¦ç¶ºéº
git ã使ã£ã¦ãã¦æ²¢å±±ãã©ã³ããä½ãã¨è²ã 訳ããããªããªãã®ã§ãããçãããã©ã³ãã®ç®¡çã¯ã©ãããã¦ããã®ã§ããããã ã¹ãã¼ããªãã©ã³ã管çæ¹æ³ãããã°æãã¦ä¸ããã ç¾ç¶ã¯ README.rst ã BRANCHES.rst ãªã©ãä½ã£ã¦ããã«ãã©ã³ãæ å ±ãæ¸ãã¦ããã¦ãã¾ãã ã¡ãªã¿ã« git-flow ã使ã£ã¦éçºããã¦ããã®ã§ãã©ã³ããã¬ã³ã¬ã³åãã¾ãã http://keijinsonyaban.blogspot.com/2010/10/successful-git-branching-model.html
I have a Git repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository. How can I do this while keeping the history of the files within the subdirectory? I guess I could make a clone and remove the unwanted parts of each clone, but I suppose this would give me the complete tree whe
åé¡ git submodule ã§ä»ã®ãªãã¸ããª(以ä¸ããµãã¢ã¸ã¥ã¼ã«ã)ã®å 容ãåãè¾¼ããã¨ãç°¡åã«ã§ããã®ã§ããã ããç¨ã«è¿½å ãããµãã¢ã¸ã¥ã¼ã«ãåé¤ããããªãå ´åãããã¾ãã ãµãã¢ã¸ã¥ã¼ã«ã®è¿½å ãæ´æ°ã¯ git submodule add ã git submodule update ã§ç°¡åã«ã§ãããã®ã®ã ä½æ ã git submodule rm ãµãã³ãã³ãã¯ããã¾ããã ã©ãããã°åé¤ã§ããã®ã§ããããã 解決æ¹æ³ submodule_name='The name of a submodule you want to remove.' submodule_path="$(git config --file .gitmodules --get "submodule.$submodule_name.path")" git rm --cached "$submodule_pat
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
å人çã¡ã¢ DIR以ä¸ããã¡ã¤ã«ãæ®ãã¤ã¤å帰çã«ç®¡ç対象ããå¤ãã git rm -r --cached DIR/ echo DIR/ >> .gitignore git commit ãã¾ãã«ãåºæ¬çãªãã¨ã§ã¹ããã»ã³ã ã«ãã´ãªã¼ » Computer æç¨¿æ¥ Â» 2010/06/26 åææ¥ - 09:16:40 by ããªã ã³ã¡ã³ãã¯ãã¡ãããã©ããããèªèº«ã®ãµã¤ããããã©ãã¯ããã¯ãå©ç¨ããå ´åã¯ä»¥ä¸ã® URI ããå©ç¨ãã ããã http://kaede.to/~canada/doc/git-rm-cached/trackback/
ã«ã¤ãã¦ã®ã¡ã¢ã åºå件æ°ãæå®ãã åºå件æ°ã表示ãããã©ã¡ãããã£ããã $ git log -n 10 # ææ°10件ã®ãã° $ git log -10 # ææ°10件ã®ãã° ç¯å²æå® ã³ãããã®ç¯å²ãæå®ãã $ git log HEAD~10..HEAD~5 # 10ååã5ååã¾ã§ã®ãã° $ git log HEAD~10.. # 10ååããææ°ã¾ã§ã®ãã° $ git log 3hg4390fj3..93jj23rn20 # ããã·ã¥å¤ã§ç¯å²æå® ãããå½¢å¼ã§åºåãã -pã§ãããå½¢å¼ã§åºåããã $ git log -p Authorããæ¢ã ã³ããããã人ãæå®ãããé¨åä¸è´ã£ã½ãã $ git log --author=hokamura # hokamuraãå«ãAuthorã®ãã° ã³ãããæ¥æããæ¢ã æå®ããæé以éã®ã³ãããã表示ãããã©ã¡ãããã£ããã $ gi
ç§ãgitã使ãã ããã®ã¯gitå ¥é(濱é2009)ãèªãã§ãããªãã§ããããããé常ã«ããã£ããä½ã®ããã«ç¨æãããæ©è½ãªã®ã/ã©ã®ãããªä»çµã¿ã§åãã¦ããã®ãããã®æ ¹ã£ãã®ã¨ããããã¡ãã¨è§£èª¬ããã¦ããã®ã§å種ã³ãã³ããã©ã®ãããªæå³ãæã¤ã®ããããªãç解ã§ãããåæ£VCSã¯è¤éããã§æ¬é ãã¦ããã®ã ããgitã¯æ§é ãã·ã³ãã«ã§ç´æçãªã®ã§åçããç解ããã°svnãã容æã«ä½¿ãããªãã(ã¨ãããsvnã®ã¢ã¼ããã¯ãã£ã«ã¤ãã¦ã¯ãã¾ã ã«ç解ã§ãã¦ãªãâ¦â¦ãã©ããã«ããå ¥éæ¸ãªãã ããã)ã gitã®ã¢ã¼ããã¯ãã£ã«ã¤ãã¦ãèªåãªãã®ç解ãã¾ã¨ãã¦ã¿ããã¨æãã gitã¯ã©ã®ããã«ãªãã¸ããªã管çãã¦ããã ãªãã¸ã§ã¯ãã¨ã¯ãgitããã¼ã¿ãæ±ãåä½ãã³ãããããã¡ã¤ã«ã®å 容ãªã©ã¯ãªãã¸ã§ã¯ãã¨ãã¦è¡¨ããã ãªãã¸ã§ã¯ãã¯å 容ã«å¿ããä¸æã®IDãæã¤(å 容ã®ããã·ã¥å¤ãIDã«ãªã) ä¸åã®
åæ© è¤æ°ã®remoteãè¨å®ãããªãã¸ããªãããã $ git remote origin library-agit fetchã®ããã©ã«ãã ã¨ã¿ã°ãåå¾ãããã¨ããã§ã¿ã°ã®åå空éã¯ã©ãããfetchãããã«ãããåãã $ git tag my_tag $ git fetch library-a # library-aã®ã¿ã°ãåå¾ããrefs/tags/*㸠$ git tag v1.0 v2.0 v2.1 v2.2 : : my_tagãã¼ã°ããããããã«ãããããªã¢ã¼ããå¤æ°ã«ãªãã¨è¡çªããããªããã¿ã°ã®åå空éãåãããã library-aã®ã¿ã°ã¯ library-a/v1.0 ã¨ãã§ã¢ã¯ã»ã¹ã§ããããã«ãªãã¨ããã§ããã æ¹æ³ git fetchã«--no-tagsãªãã·ã§ã³ãä»ãããã¨ã§ã¿ã°ãåå¾ããªããã¨ãã§ãã $ git fetch --no-tags librar
ããããã㨠ReopA,RepoBããããReboB/masterãRepoA/repob-branchã«ã³ãã¼ããã æ¹æ³ 追è¨: git fetch location refs/heads/branch-from:refs/heads/branch-to ã§ããããã¨Junioæ§ã«æãã¦ããã ãã¾ãã(ã²ã¼)ãã³ã¡ã³ãåç §ã åãªãã¸ããªã®ä½ç½®ã/repo_a,/repo_bã¨ãã 1. RepoBã®ãªãã¸ã§ã¯ããå ¨é¨RepoAã«ã³ãã¼ã $ cp -rf /repo_b/.git/objects /repo_a/.git/2. RepoB/masterã®ãªãã¸ã§ã¯ãIDã調ã¹ã [/repo_b]$ cat .git/refs/heads/master 37e7c1e20928bc...3. 2ã§èª¿ã¹ãã³ããããªãã¸ã§ã¯ãããã§ãã¯ã¢ã¦ããã [/repo_a]$ git chec
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}