æä½éãããã¦ããããEGitã®ä½¿ãæ¹ã«ã¤ãã¦
æè¿ã½ã¼ã¹ç®¡çã«Gitã使ãããã¸ã§ã¯ããããªãå¢ãã¦ãã¾ãããã½ã¼ã¹ç®¡çã¯SVNã§ååã¨æã£ã¦ããã¦ã¼ã¶ãããã¸ã§ã¯ãã®æ¹éã¨ãã¦Gitã«ãªã£ãå ´åãæä½éã®æä½ãè¦ããªãã¨ä½æ¥ã«æ¯éããããã¦ãã¾ãã¾ãããã®éã«ã³ãã³ãã©ã¤ã³ã§æä½ãã¦ãè¯ãã®ã§ãããä»ã¾ã§SVNã§Subversiveã¨ãSubclipseãªã©ã使ã£ã¦ããEclipseã¦ã¼ã¶ã¯ãEclipseããGitãæä½ãããã¨ããã§ãã
ããã§EGitã使ããã¨æã£ã¦ãEGitèªä½ã¯ããããæ´å²ãããå²ã«æå¤ã¨æ å ±ãå°ãªãã¦å°ã£ã¦ãã¾ã£ã人ãããã®ã§ã¯ãªãã§ããããï¼ã
ä»åã¯ããã¸ã§ã¯ãã§ä½¿ãã«å½ãã£ã¦ãæä½éç¥ã£ã¦ããã°ã©ãã«ããªããããªæä½ãã¾ã¨ãã¦ã¿ããã¨ã«ãã¾ãããæ§æã¨ãã¦ã¯å©ç¨è å´ã¨ãã¦Gitãå©ç¨ãããã¨ãæ³å®ãã¦ã¿ã¾ãããå®éãä½æ¥ãã¦é çªã¨ã¯éãã®ã§ãã¡ã¤ã«ã«ä¸é¨çç¾ããã¨ãããããã¾ããæ°ã«ããªãã§ãã ããã
ç§èªèº«ã¾ã ã¾ã ç¥ããªããã¨ãå¤ãã®ã§ãééã£ã¦ããç¹ããã£ã¨å¹çããåºæ¥ãç¹ãªã©ããããã¾ããããææãã ããã
ç°å¢ã¨ãã¦ã¯ä»¥ä¸ã§è©¦ãã¦ãã¾ãã
OSï¼Mac
Eclipseï¼3.6
EGitï¼1.0
ãªãã¸ããªã«ã¯GitHubãå©ç¨ãã¦ãã¾ãã
Gitã®ãªã¢ã¼ããªãã¸ããªããããã¸ã§ã¯ããåå¾
誰ããGitã«ä¸ããããã¸ã§ã¯ããEclipseã«åãè¾¼ã¿ã¾ããGitã§ã¯cloneããã¨è¨ãã¾ãã
Package Explorerãå³ã¯ãªãã¯ï¼importãé¸æãã¾ãã
Gitï¼Projects from Gitãé¸æãã¾ãã
åå¾ãããªãã¸ããªãæå®ãã¾ããGitHubã®å ´åãWebã§ã³ãã¼åºæ¥ãurlãURLæ¬ã«ã³ãã¼ãã¾ããProtocolæ¬ã«SSHãé¸æãã¾ããããã¨URLæ¬ãSSHã«ãããã¦å¤æ´ããã¾ããããã®ã¾ã¾ã§ãã¾ãã¾ãããnextãã¯ãªãã¯ãã¾ãã
cloneãããªãã¸ããªãé¸æãã¦nextãã¯ãªãã¯ãã¾ãã
ãã¼ã«ã«ãªãã¸ããªãä½æããå¿
è¦ãããã®ã§ãã¹ãæå®ãã¾ããæå®ãããfinishãã¯ãªãã¯ãã¾ãã
importããããã¸ã§ã¯ãã®é¸æã表示ããã¾ãããã®ã¾ã¾nextãã¯ãªãã¯ãã¾ãã
ä»åã¯Eclipseããã¸ã§ã¯ããGitããcloneããã®ã§ãImport Existing Projectsã«ãã§ãã¯ãã¦nextãæ¼ãã¾ãã
importãããããã¸ã§ã¯ããé¸æãã¦finishãã¯ãªãã¯ãã¾ãã
ããã§Eclipseã«ããã¸ã§ã¯ããcloneãããã¨ãåºæ¥ã¾ããã
ãã¼ã«ã«ãªãã¸ããªã¸ã®commit
Gitã®å ´åããã¡ã¤ã«ãä¿®æ£ãããã¾ãã¯ãã¼ã«ã«ãªãã¸ããªã«commitãã¾ãã
ã§ã¯ç¾å¨ã®ããã¸ã§ã¯ãããã¼ã«ã«ãªãã¸ããªã«commitãã¦ã¿ã¾ããå³ã¯ãªãã¯ï¼Teamï¼Commitãé¸æãã¾ãã
ååã¯ã¦ã¼ã¶æ
å ±ãæ±ããããã®ã§å
¥åãã¾ãã
ã³ããããã¤ã¢ãã°ã表示ãããã®ã§ã³ã¡ã³ãã®å
¥åã¨ã³ããããããã¡ã¤ã«ãé¸æãã¦ãcommitãã¿ã³ãæ¼ãã¾ãã
ããã§ãã¼ã«ã«ãªãã¸ããªã«ã³ããããåºæ¥ã¾ããããã¼ã¯ã?ããæ¶ãã¦ããã®ã確èªåºæ¥ãã¨æãã¾ãã
Gitã®å ´åãcommitããã ãã§ã¯ã½ã¼ã¹ãåæ ãããã¨ãåºæ¥ã¾ããããã®å¾ã«ãªã¢ã¼ããªãã¸ããªã«å¯¾ãã¦pushããå¿ è¦ãããã¾ããç¶ãã¦ãªã¢ã¼ããªãã¸ããªã«pushããæ¹æ³ã«ã¤ãã¦ã§ãã
ãªã¢ã¼ããªãã¸ããªã«pushãã
ãã¼ã«ã«ãªãã¸ããªã«commitããããªã¢ã¼ããªãã¸ããªã«åæ ãããããã«pushããå¿
è¦ãããã¾ãã
ããã¸ã§ã¯ããé¸æãã¦ãå³ã¯ãªãã¯ï¼Teamï¼Remoteï¼Pushãã¯ãªãã¯ãã¾ãã
pushãããªãã¸ããªãè¨å®ãã¦nextãã¯ãªãã¯ãã¾ãã
pushããããã©ã³ããé¸æãã¾ãã
é¸æãããAdd Specãã¿ã³ãã¯ãªãã¯ãã¾ããããã¨Specifications for pushã«è¨å®ãåæ ããã¾ããnextãã¯ãªãã¯ãã¾ãã
確èªç»é¢ã表示ãããã®ã§finishãã¯ãªãã¯ãã¾ãã
ãã®ã¨ãååã®å ´åãã»ãã¥ãªãã£ã®è¦åãåºãå ´åãããããã§ãã
å®äºç»é¢ã表示ããOKãã¯ãªãã¯ãã¦å®äºã§ãã
èªåãä»ã®äººãå¤æ´ããå 容ã®ç¢ºèª
å¤æ´ã確èªãã¾ãã
ããã¸ã§ã¯ããé¸æãã¦å³ã¯ãªãã¯ï¼Teamï¼Synchronizeï¼FETCH_HEADãé¸æãã¾ãã
Synchronizing perspectiveã表示ãããã¨ãã¤ã¢ãã°ã§è¨ªãããã¾ããYesã§ãNoã§ããã¾ãã¾ãããããã§ã¯Yesãé¸æãã¾ãã
ãªãã¸ããªã¨ã®å·®åã表示ããã¾ããããã§ã¯ãHelloWorld.scalaãä»ã®äººããç·¨éããã¦ãHelloWorld2.scalaãèªåãæ°è¦ã«ä½æãããã¨ã表ãã¦ãã¾ãã
ãã¡ã¤ã«ãããã«ã¯ãªãã¯ããã¨å·®åã確èªãããã¨ãåºæ¥ã¾ãã
HelloWorld.scalaãé¸æãã¦å³ã¯ãªãã¯ï¼Mergeã§åãè¾¼ããã¨ãåºæ¥ã¾ãã
èªåã®æ´æ°ã¯é常ã¨åãããã«commitâpushã§å¯¾å¿ãã¾ãã
ãã¼ã«ã«ãªãã¸ããªã®ç»é²
ä¸å¿ãããã¸ã§ã¯ãã®ç»é²ã«ã¤ãã¦ã説æãã¾ããããã§ã¯GitTestã¨ããããã¸ã§ã¯ããç»é²ãã¦ã¿ããã¨ã«ãã¾ãã
ã¾ãã¯ãããã¸ã§ã¯ããé¸æãã¦ãå³ã¯ãªãã¯ï¼Teamï¼Share Projectãé¸æãã¾ãã
Gitãé¸æãã¦Nextãã¯ãªãã¯ãã¾ãã
ãã¼ã«ã«ãªãã¸ããªã®ãã¹ãæå®ãã¦ãªãã¸ããªãä½æãã¾ããcreateãã¿ã³ãæ¼ãã¦é¸æãã¤ã¢ãã°ã表示ããã¾ãã
ãã¼ã«ã«ã®Gitãªãã¸ããªã®ãã¹ãé¸æãã¾ãã好ããªå ´æãé¸æãã¾ããããããã§ã¯ã/local_gitãæå®ãã¾ãããååã«GitTestãæå®ãã¾ããã
ãã§ãã¯ããã¯ã¹ãUse or create Repository in parent folder of projectãã«ãã§ãã¯ãã¤ããã¨ç¾å¨ã®ããã¸ã§ã¯ãã«ãªãã¸ããªãä½ããã¨ãåºæ¥ã¾ãã
注æç¹ã¨ãã¦ã¯ããã®å¾ãªã¢ã¼ããªãã¸ããªã«ç»é²ããéã«ãªãã¸ããªãæå®ããæ¹ã®æ¹æ³ã ã¨GitTestãªãã¸ããªã®ä¸ã«Eclipseã®GitTestããã¸ã§ã¯ããé ç½®ããããããªæ§æã«ãªãããã§ãããã§ãã¯ããã¯ã¹ããã§ãã¯ããæ¹æ³ã ã¨GitTestãªãã¸ããªã®ä¸ã«GitTestãã©ã«ãã¯ä½ããã¾ãããGitHubã§ææãªãã·ã§ã³ã使ç¨ãã¦ãã¦å©ç¨åºæ¥ããªãã¸ããªã«å¶éãããå ´åãªã©ã¯ä¸ã®ãã¿ã¼ã³ãå©ç¨ããæ¹ãããã§ãããã
èªåã§ãªãã¸ããªã®å ´æãé¸ãã å ´å
ãã§ãã¯ããã¯ã¹ãUse or create Repository in parent folder of projectãã«ãã§ãã¯ãã¤ããå ´å
ãªãã¸ããªãé¸æãããFinishãã¿ã³ãæ¼ãã¦çµäºã§ãã
ãªãã¸ããªã®è¨å®ãåºæ¥ã¾ããã以ä¸ã®ãããªæãã«ãªã£ã¦ããã¨æãã¾ãã
çµããã«
ä»åã¯EGitã«ã¤ãã¦ã¾ã¨ãã¾ãããç»åããµãã ãã«ä½¿ç¨ããããä½æ°ã«ãã®ãããæéããããã¾ãããEGitã¯å®å®ãã¦ããªãããªï¼ã¨æãããã¨ãããã¾ããååã«å®ç¨ã§ä½¿ç¨åºæ¥ãã¬ãã«ã«éãã¦ãã¦ããã¨æãã¾ããç§èªèº«ãç¥ããªãæ©è½ãããããããã®ã§ãåç¥ã®æ¹ã¯è²ã ã¨æãã¦ããã ããã¨ãããããã§ãã
EGitã«ã¤ãã¦ããã«è©³ããç¥ãããå ´åã¯ã以ä¸ã«User Guideãããã®ã§åç
§ãã¦ã¿ã¦ãã ããã
http://wiki.eclipse.org/EGit/User_Guide