åæ£ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã®å©ç¨ã¯æ¡å¤§ãã¦ãã¾ãããã®ãªãã§ãæã人æ°ã®ãããã¼ã«ã¯Gitã§ããããããããGitãWindowsã§ä½¿ãã®ã¯ãªããªãå°é£ã§ããã
Windowsåãã®Gitã§ããmsysGitã¯ãbashã®ã³ã³ã½ã¼ã«ãåºãã¦ãæå°éã®Unix風ã³ãã³ãã©ã¤ã³ç°å¢ãæä¾ãããã®ã§ããããã¯ä½¿ããããããã¾ãããããä¸ã¤ã®é¸æè¢ã§ããTortoise Gitã¯ãWindowsã®ã¨ã¯ã¹ããã¼ã©ã¼ï¼ãã¡ã¤ã«ããã¼ã¸ã£ï¼ã«çµ±åãããGUIãã¼ã«ã§ãããåã¯ããªããéããªãã¨æãã¦ã¾ãã -- ããã¯å人ã®ææ§ã®åé¡ã§ããããã¡ã¤ã«ããã¼ã¸ã£ã«æ¨ªä»ããããã¨ããåæ£ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã¸ã®è¯ãUIãæä¾ããããã«ã¯æããªãã®ã§ãã
ã¨ããããæè¿ã¯äºæ ã大ããå¤ãã£ã¦ãã¾ãã使ããããGUIãã¼ã«ã¨ãã¦ã2013å¹´6æã«æ£å¼å ¬éãããSourceTree for Windowsãåå¨ãã¾ãï¼ã¡ãªã¿ã«Macçãããã¾ããï¼ã2014å¹´1æ29æ¥ã«çºè¡¨ãããææ°ã®ãã¼ã¸ã§ã³1.4ã§ã¯ã¡ããã¨æ¥æ¬èªåããã¦ãã¾ããåã«ã¨ã£ã¦ã¯ãGitãMercurialã両æ¹ãµãã¼ããã¦ããã®ããããããããã®ã§ãããGitå°ç¨ã§ä½¿ã£ã¦ãåªããã®ã§ãã
ã³ãã³ãã©ã¤ã³ãã¼ã«ã§ããmsysGitããæè¿ã¯Git for Windowsã¨å¼ã¶ããããçå®ã«é²åãã¦ãã¾ããGUIãã¼ã«ã®SourceTreeã ãã§ãGitã®æä½ãå®å ¨ã«è¡ãã¾ãããGitã«é¢ãã説æãä¾ç¤ºã§ã¯ã³ãã³ãã©ã¤ã³ã使ããã¾ãã®ã§ãå¦ç¿ã®éç¨ã§ã¯ã³ãã³ãã©ã¤ã³ãã¼ã«ãå¿ è¦ã ã¨æãã¾ãããããªãGUIç»é¢ã«åãåã£ã¦ããä½ããã¦ããããµãããªåãããªãã§ãããã
ã¨ããããã§ãGit for Windowsã¨SourceTreeã®ä¸¡æ¹ãã¤ã³ã¹ãã¼ã«ãã¦ã好ã¿ã«å¿ãã¦ã©ã¡ãããä¸å¿ã«ä½¿ããã¨ããããæ¹ã§ãWindowsã«ãããGitå©ç¨ã¯ååå¿«é©ã«ãªãã¾ãã
å 容ï¼
- Git for Windowsã®ã¤ã³ã¹ãã¼ã«
- SourceTree for Windowsã®ã¤ã³ã¹ãã¼ã«
- ã³ãã³ãã©ã¤ã³ï¼GUIãã¼ã«
- Gitãå¦ç¿ããéã®æ³¨æç¹
é¢é£è¨äºï¼
- å°ãè£è¶³ï¼ Git for Windows 㨠SourceTree for Window
- ããGitã¯æããªãï¼ èªä¿¡ãæã£ã¦ä½¿ãããããªãã¸
[è¿½è¨ date="2015-09-23"]
- Git for Windowsãµã¤ãã®URLã https://git-for-windows.github.io/ ã«å¤ããã¾ãããä¿®æ£ãã¾ããã
- Git for Windowsã®ç¾æç¹ï¼2015å¹´9æï¼ã§ã®ææ°ãã¼ã¸ã§ã³ã¯ Version 2.5.2 ã§ãã
- SourceTreeã®ç¾æç¹ï¼2015å¹´9æï¼ã§ã®ææ°ãã¼ã¸ã§ã³ã¯ Version 1.6.21 ã§ãã
- ã½ããã¦ã§ã¢ã®ãã¼ã¸ã§ã³ã¯å¤ããã¾ãããããã®è¨äºã®å 容ã¯ç¾æç¹ï¼2015å¹´9æï¼ã§ãéç¨ãã¾ãã
[/追è¨]
Git for Windowsã®ã¤ã³ã¹ãã¼ã«
Git for WindowsãSourceTreeããWindowsã¤ã³ã¹ãã¼ã©ã¼ã«ããã¤ã³ã¹ãã¼ã«ã§ãã¦ãã³ã³ããã¼ã«ããã«ã®ç®¡çä¸ã«ãªãã¾ããã¤ã³ã¹ãã¼ã«ãã¢ã³ã¤ã³ã¹ãã¼ã«ãç°¡åã§ãããªã«ãééã£ãã¨ãã¯åã¤ã³ã¹ãã¼ã«ããã°ããã®ã§å®å¿ã§ãã
Git for Windowsã¨SourceTreeãä½µç¨ããå ´åãGit for Windowsãå ã«ã¤ã³ã¹ãã¼ã«ããã»ããè¥å¹²ã®æéãçãã¾ãããªã®ã§ãå ã«Git for Windowsãã¤ã³ã¹ãã¼ã«ãããã¨ã«ãã¾ãã
Git for Windowsã®ãã¼ã ãã¼ã¸ããã¤ã³ã¹ãã¼ã©ã¼ããã¦ã³ãã¼ãã§ãã¾ãã
åã¯ãææ°çã®ä¸ã¤åã®Git-1.8.4-preview20130916.exeããã¦ã³ãã¼ããã¾ããã
ã¤ã³ã¹ãã¼ã«ã«é£ãããã¨ã¯ä½ãããã¾ããããGit for Windowsãããã©ã«ãã§ã¤ã³ã¹ãã¼ã«ããã¨ãã»ã¨ãã©ã®äººã«ã¯ä¸ä¾¿ãªç¶æ³ã«ãªã£ã¦ãã¾ãã®ã§æ³¨æãå¿ è¦ã§ãã
ã¾ãã¯ãSelect Componentsã
ããã¯ããã©ã«ãã®ã¾ã¾ã§ããã¾ãã¾ãããï¼
- bashã³ã³ã½ã¼ã«ã使ã人ã¯ãAdditional iconsãé¸ãã§ãããã»ããèµ·åã«ä¾¿å©ã§ããåã¯ãOn the Desktopã®ã¢ã¤ã³ã³ãç½®ãã¦ãã¾ããããã¯ãï¼Gitã®ãã£ã¬ã¯ããªï¼\bin\sh.exe --login -i ãå®è¡ããã·ã§ã¼ãã«ããã§ãï¼sh.exeã¨bash.exeã¯åãï¼ã
- Windows Explore integrationã¯ãã£ã¦ã害ã¯ãªãã§ãããSourceTreeã¨ä½µç¨ãããªãåºçªã¯ãªãã¨æãã¾ãã
- ä»ã®è¨å®ãä½è¨ãªãä¸è©±ãªãã§åã¯ãªãã«ãã¦ã¾ãããã好ã¿ãã ãã§ãã
ãã¦ãåé¡ã¯æ¬¡ã®Adjusting your PATH environmentã§ãã
ããã©ã«ãã¯Use Git Bash onlyã§ãããããã¯ä½¿ãã«ããã®ã§ãã¡ã§ããRun Git from the Windows Command Promptã«å¤æ´ãã¾ããããããããã¨ãcmd.exeãPowerShell.exeãMinGW/MSYSã®bash.exeãªã©ãä»ã®ã³ãã³ãã©ã¤ã³ã·ã§ã«ãããGitã³ãã³ãã使ããããã«ãªãã¾ãã
ããã®è¨å®ã¯PATHç°å¢å¤æ°ã«å¯¾ãããã®ã§ããã次ã®2ã¤ã®å ´æãPATHã«å«ãããã©ããã決å®ãã¦ãã¾ããï¼ç°å¢å¤æ°ãããç¥ããªã人ã¯ãããã¯æ°ã«ããªãã¦ããã§ããï¼
- ï¼Gitã®ãã£ã¬ã¯ããªï¼\cmd\
- ï¼Gitã®ãã£ã¬ã¯ããªï¼\bin\
ä¸è¨ã®è¨å®ãããã¨ãï¼Gitã®ãã£ã¬ã¯ããªï¼\cmd\ ãPATHç°å¢å¤æ°ã«è¨å®ããã¾ãããã ããï¼Gitã®ãã£ã¬ã¯ããªï¼\cmd\git.exe ã¯åãªãã©ã³ãã£ã¼ãªã®ã§ãGitã®ãã£ã¬ã¯ããªã®ãã¡ã¤ã«ç¾¤ããªãã¨åä½ããªããã¨ã«æ³¨æãã¦ãã ããã
ããã§ãGitå°ç¨ã®bashã³ã³ã½ã¼ã«ãèµ·åãããã¨ããã好ã¿ã®ã³ãã³ãã©ã¤ã³ã·ã§ã«ããGitã³ãã³ãã使ããã¨ãåºæ¥ãããã«ãªãã¾ããã
cmd.exeã§ã®ä¾ï¼
C:\Users\hiyama>git --version
git version 1.8.4.msysgit.0C:\Users\hiyama>
SourceTree for Windowsã®ã¤ã³ã¹ãã¼ã«
次ã®ãã¦ãã¼ããã¼ã¸ãéãã¨èªåçã«ãã¦ãã¼ãç¶æ ã«ãªãã¾ãï¼æåã§ã¯ãªãã¯ãããªã³ã¯ãããã¾ãï¼ã
ã¤ã³ã¹ãã¼ã©ã¼ãã¡ã¤ã«SourceTreeSetup_1.4.0.exeãå®è¡ãã¦ã¤ã³ã¹ãã¼ã«ãã¾ããå¿ è¦ãªãã.NET Frameworkã®ã¤ã³ã¹ãã¼ã«ã¨ããè¡ããã¾ããã¤ã³ã¹ãã¼ã«ã®ã¨ãè²ã ã¨èããã¾ãããå¾ããã§ãå¤æ´ã§ããã®ã§æ°ã«ããå¿ è¦ã¯ããã¾ããã
å ã«ã¤ã³ã¹ãã¼ã«ããGitã®å ´æãèãããå¯è½æ§ãããã¾ããããã®ã¨ã㯠ï¼Gitã®ãã£ã¬ã¯ããªï¼\bin\ ï¼ã ã£ãããï¼Gitã®ãã£ã¬ã¯ããªï¼\bin\git.exe ãã¡ã¤ã«ã ã£ããï¼ãã¤ã³ã¹ãã¼ã©ã¼ã«æãã¦ããã°ããã®ã§ãããã®ç»é¢ã®ã¹ãããã·ã§ãããæ®ããã¨ããã®ã§ãããäºåº¦ç®ã®ã¤ã³ã¹ãã¼ã«ã ã¨ã¹ãããããããããç»é¢ãåºã¦ãã¾ããã§ãããhttp://blog.aotak.me/post/67349113824/sourcetree-tutorial-1 ããä¼¼ãç»é¢ãæåããã¨ï¼
- ç¾å¨ã¯æ¥æ¬èªåããã¦ãã¾ãã
- ä¸ãã2çªç®ã®é ç®ãé¸ãã§ãGitã®ããå ´æãæå®ãã¾ãã
- ä¸çªä¸ã®ãSourceTreeå°ç¨ã®Gitã使ããã«ãã¦ãå·®ãæ¯ãã¯ããã¾ãããGitãäºã¤ã¤ã³ã¹ãã¼ã«ããã®ã§ç¡é§ã¯ããã¾ããã
ã³ãã³ãã©ã¤ã³ï¼GUIãã¼ã«
SourceTreeãç´ æ´ãããã®ã¯ãGUIã®ç»é¢ãã»ã¼Gitã®ã³ãã³ã群ã«å¯¾å¿ãã¦ãããã¨ã§ããããã«ãé¢ãããUIã¨ãã¦ãèªç¶ã«ã¾ã¨ã¾ã£ã¦ãã¾ãã
ãã£ã¨èª¬æããã¨ï¼
- ãã¼ã«ãã¼ã®å·¦ç«¯ã®ãæ°è¦ / ã¯ãã¼ã³ãä½æããã㯠git initãgit cloneã«å¯¾å¿ãã¦ãã¾ãã
- ãã¼ã«ãã¼ã®å³ç«¯ã®ãè¨å®ã㯠git config ã«å¯¾å¿ãã¦ãã¾ãã
- ãã®ä»ã®ãã¼ã«ãã¿ã³ããã³ãã³ãã¨ã®å¯¾å¿ãåãããããã§ããã
- ä¸çªå·¦ã®ãã¤ã³ã¯ããªãã¸ããªã®ä¸è¦§ã§ãã
- ãã®é£ã®ç¸¦ã«ç´°é·ããã¤ã³ã¯ git statusãgit branchãgit tagãgit remoteã«å¯¾å¿ãã¦ãã¾ãã
- å³ã®ã»ãã«ä½ç½®ããããã¤ãã®ãã¤ã³ã¯ãgit logãgit showãgit statusãgit diffãªã©ã®åºåã«å¯¾å¿ãã¾ãã
SourceTreeã¯ãä»ã®ãã¼ã«ï¼ä¾ãã°ãã³ãã³ãã©ã¤ã³ããã®gitï¼ã«ããå¤æ´ãæ¤åºãã¦ç»é¢ãææ°ç¶æ ã«æ´æ°ãã¦ããã¾ããããã«ãããgitã³ãã³ãã®å®è¡ããã¤ã³ããã¯ã¹ï¼ã¹ãã¼ã¸ã³ã°ã¨ãªã¢ãããªã³ãããï¼ããªãã¸ããªã®ã³ããã家系å³ï¼æåã°ã©ãï¼ã«ã©ã®ãããªå½±é¿ãåã¼ãããè¦è¦çã«ç¢ºèªãããã¨ãã§ãã¾ãã
ãã¤ã³ããã¯ã¹ãããã³ããã家系å³ããä½ã§ããããä»ã¯ç¥ããªãã¦ããã¾ãã¾ããããã®ãããªæ¦å¿µãç解ããã¨ãã«ãSourceTreeã大ãã«å©ãã«ãªãã¨ãããã¨ã§ãã
Gitãå¦ç¿ããéã®æ³¨æç¹
è¤æ°ã®ãªãã¸ããªã®ç·¨æï¼ç¸äºé¢ä¿ï¼ãã©ããããï¼ ãã©ã³ãã®ç¨éã¨å½åè¦åã¯ï¼ ã©ã®ãããªã¯ã¼ã¯ããã¼ã«ãããï¼ ãªã©ã¯å ¨ã¦Gitã®éç¨ä¸ã®åé¡ã§ããGitèªä½ã¯ãåãªãéå ·ã§ãã使ãæ¹ãè¦å®ãããã®ã§ã¯ããã¾ãããåã ã®åºæ¬æ©è½ã¯æ¯è¼çåç´ã§ãããããããã®çµã¿åããæ¹ã¯ç¡éã®å¯è½æ§ãããã¾ãããã®æè»æ§ã»èªç±åº¦ã®é«ãã¯ï¼ä¸é¨ã®äººã«æ¬é ãããè¦å ã¨ããªã£ã¦ã¾ããï¼ãGitã®å¤§ããªç¹å¾´ï¼ã¡ãªããã§ãã
ãã¼ã¸ã§ã³ç®¡çï¼ãªãã¸ã§ã³ç®¡çï¼ã®ãã¹ããã©ã¯ãã£ã¹ã®ãããªç¥èã大äºã§ãããããããããåã«ãã³ãããï¼ãªãã¸ã§ã³ï¼ããã©ã³ãããã¼ã¸ããã«ã¨ããã·ã¥ã®ãããªåºæ¬çãªæ¦å¿µã¨æ©è½ãç解ãã¦ãããã»ããããã§ããããããã§ãªãã¨ãèªåãä½ããã£ã¦ããããã¢ã¤ãã¤ãªã¾ã¾ã«ä½¿ãç¶ãããã¨ã«ãªãã¾ãã
SubversionãMercurialã使ã£ãçµé¨ãããã°Gitã®ç¿å¾ã«æå©ã¨è¨ããããã¨ãããã¾ãããããã¯ã©ããªãã§ããããï¼ åã¯ããã¨ãè¨ããªãã¨æã£ã¦ãã¾ãã
ä¾ãã°ããã©ã³ããã®æ¦å¿µã¯ãSubversionã¨Gitã§ã¯å ¨ãéãã¾ããåãããããã«éãã¾ããåãè¨èã使ã£ã¦ãã¦ãå¥ç©ã ã¨èããã¹ãã§ããSubversionã®ãã©ã³ãã¯ãåºæ¥ãã°ä½¿ããããªãé¢åãªãã®ã§ããä¸æ¹Gitã®ãã©ã³ãã¯ããããªãã§ã¯ä½æ¥ãã§ããªãã»ã©ã«æ¬è³ªçãªæ©è½ã§ãã
Gitã®ãã©ã³ãã¯ãåé¡ã®åæ£ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã§ããMercurialã®ãã©ã³ãã¨ãéãã¾ããMercurialã§ã¯ããã©ã³ãã®æä½ãããªãã®ç¨åº¦èªåã§ãã£ã¦ããã¾ããGitã¯ããã§ã¯ããã¾ãããããã¯åªå£ã®åé¡ã§ã¯ãªãã¦ãããªã·ã¼ã¨ã¡ã«ããºã ãéãã¨ãããã¨ã§ãã
ãã©ã³ãã¯ãGitã®ãªãã§æãéè¦ã§ãããªããæãåããã«ããæ¦å¿µã§ãããã表é¢çãªè¨èã«é¨ããããå å ¥è¦³ãæãããSourceTreeã®è¦è¦ç表示ï¼æ¨¹å½¢å³ï¼ã®åãåããªããå¦ç¿ããã®ããç解ã¸ã®ä¸çªã®è¿éã§ãã
ããã¸ãã®è©³ãããã¨ã¯ã¾ãã®æ©ä¼ã«è¿°ã¹ãããç¥ãã¾ããã