Windows PCãGitã®ãªã¢ã¼ããªãã¸ããªã¨ãã¦ä½¿ç¨ããæ¹æ³
ä»åã¯ãWindows PCãGitã®ãªã¢ã¼ããªãã¸ããªã¨ãã¦ä½¿ç¨ããæ¹æ³ãç´¹ä»ããã
Gitã¨ã¯ãããã°ã©ã ã®ã½ã¼ã¹ã³ã¼ããªã©ã®å¤æ´å±¥æ´ãè¨é²ã»è¿½è·¡ããããã®åæ£åãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã§ããã
æ
éçãæãããããé常ã¯ãµã¼ããã·ã³ã®Linuxä¸ã«æ§ç¯ããGitããªã¢ã¼ããªãã¸ããªã¨ãã¦ä½¿ç¨ãããã¨ãå¤ãã¨æãããã
ããããããããã¸ã§ã¯ãã§æ©å¨èª¿éã®é
ãããããã¼ãPCã®Windows7ä¸ã«Gitãæ§ç¯ãããªã¢ã¼ããªãã¸ããªã¨ãã¦å©ç¨ãããã¨ã¨ãªã£ãã
ä»åã¯ããã®æã«èª¿æ»ããå
容ãã¾ã¨ãããã®ã§ããã
注æ
ä»åç´¹ä»ããæ¹æ³ã¯ãå®å
¨ãªLANå
ã«ããããã¤LANã«ã¢ã¯ã»ã¹ã§ãã人éãæªæãæããªããã¨ãåæã¨ããæ¹æ³ã§ãããæä½éã®ã»ãã¥ãªãã£ã確ä¿ããã¦ããªãäºãååã«çæãã¦é ãããã
<é¢é£ã½ããã®ãã¼ã¸ã§ã³>
Gitãµã¼ããæ§ç¯ãããã¼ãPCã®OSï¼Windows 7 Home Premium
使ç¨ããWindowsç¨ã®Gitï¼Git for Windows 1.9.0
<æé æ¦è¦>
1.Git for Windowsãã¤ã³ã¹ãã¼ã«ãã
2.ãã©ã«ããä½æããGitãªãã¸ããªã¨ãã¦åæåãã
3.å
¬éç¨ãªãã¸ããªã«æå®ãã
4.Gitãã¼ã¢ã³ãèµ·åãã
<詳細æé >
1.Git for Windowsãã¤ã³ã¹ãã¼ã«ãã
公式サイトããGit for Windowsããã¦ã³ãã¼ãããã
ãã¦ã³ãã¼ããããã¡ã¤ã«ãããã«ã¯ãªãã¯ããã¨ãã¤ã³ã¹ãã¼ã©ã¼ãç«ã¡ä¸ããã
ããã¤ãè¨å®é
ç®ãèãããããããã©ã«ãã®ã¾ã¾ã§ãæ£å¸¸ã«ã¤ã³ã¹ãã¼ã«ãããã
çè
ãã¤ã³ã¹ãã¼ã«ããæã¯ãæå¾ã«èãããé
ç®ã§ãããæ¹è¡ã³ã¼ãã®å¤æã«é¢ããé
ç®ã®ã¿ãå¤æããªãããé¸æããä»ã®é
ç®ã¯å
¨ã¦ããã©ã«ãã®ã¾ã¾ã¤ã³ã¹ãã¼ã«ããã
ã¤ã³ã¹ãã¼ã«å®äºå¾ãä»»æã®å ´æã§å³ã¯ãªãã¯ãè¡ããGitã«é¢ããã¡ãã¥ã¼ã追å ããã¦ããã°ãæ£å¸¸ã«ã¤ã³ã¹ãã¼ã«ããã¦ããã
2.ãã©ã«ããä½æããGitãªãã¸ããªã¨ãã¦åæåãã
æåã«Gitãªãã¸ããªç¨ã®è¦ªãã©ã«ããä½æãããä»»æã®å ´æã»ååã§è¯ãããããã§ã¯ãC:\gitãã¨ããã
次ã«å
ã»ã©ä½æãããGitãªãã¸ããªç¨è¦ªãã©ã«ãã®ç´ä¸ã«ãå®éã«ãªãã¸ããªã¨ãã¦ä½¿ç¨ãããã©ã«ããä½æããããã®ãã©ã«ãåãä»»æã§è¯ãããæ
£ç¿çã«ã.gitãã§çµããååãç¨ãããããããã§ã¯ããtest_remote_repository.gitãã¨ããã
ç¶ãã¦ãä½æãããtest_remote_repository.gitããã©ã«ããå³ã¯ãªãã¯ãã¦ããGit Bashããé¸æããã
ããã¨Gitç¨ã®ã³ã³ã½ã¼ã«ç»é¢ãèµ·åããã
ãã®ç»é¢ã§ä¸è¨ã®ã³ãã³ããå®è¡ãããªãã¸ããªã¨ãã¦åæåããã
git init --bare --shared=true
3.å
¬éç¨ãªãã¸ããªã«æå®ãã
ä¸è¨ã§èµ·åããGitç¨ã®ã³ã³ã½ã¼ã«ç»é¢ã§ãä¸è¨ã®ã³ãã³ããå®è¡ããGitãã¼ã¢ã³ã®å
¬éç¨ãªãã¸ããªã«æå®ããã
Gitãã¼ã¢ã³ã¯ãªãã¸ããªãã©ã«ãç´ä¸ã«ãgit-daemon-export-okããã¡ã¤ã«ãããã¨ãå
¬éç¨ãªãã¸ããªã¨ãã¦èªèããã
touch ./git-daemon-export-ok
4.Gitãã¼ã¢ã³ãèµ·åãã
ä¸è¨ã§èµ·åããGitç¨ã®ã³ã³ã½ã¼ã«ç»é¢ã§ãä¸è¨ã®ã³ãã³ããå®è¡ããGitãã¼ã¢ã³ãèµ·åããã
git daemon --export-all --enable=receive-pack --base-path=/C/git
<使ãæ¹>
Gitãã¼ã¢ã³ã®èµ·åã«ãããä¸è¨URLã«ãããä»ã®PCãããªã¢ã¼ããªãã¸ããªã¨ãã¦ã¢ã¯ã»ã¹ã§ããæ§ã«ãªãã
git://<ãªã¢ã¼ããªãã¸ããªãæ§ç¯ããPCã®IPã¢ãã¬ã¹>/test_remote_repository.git
ãã£ã¦ãä½æãããªã¢ã¼ããªãã¸ããªããã¯ãã¼ã³ããå ´åã¯ãä¸è¨ã®æ§ãªã³ãã³ããå®è¡ããäºã«ãªãã
git clone git://<ãªã¢ã¼ããªãã¸ããªãæ§ç¯ããPCã®IPã¢ãã¬ã¹>/test_remote_repository.git