Subversionã®ãªãã¸ããªãGitãªãã¸ããªã«ç§»è¡ãã
ç§ãä¸çªæåã«ä½¿ã£ããã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã¯CVSã§ãã
ããããªããã°ãå½æã®ç¡è¶ãªãã¼ã éçºã¯ä¸å¯è½ã ã£ãã¨æãã¾ããã
使ãã¥ããé¢ããã£ã¦ãããç¨åº¦éç¨ã§ã«ãã¼ããªããã°ãªãã¾ããã§ãã
ããã解決ããã®ãSubversionã§ã
ä»ã®ä¼ç¤¾ã«è³ãã¾ã§ãå
¬ç§ã¨ãã«ä½¿ãç¶ãã¦ãã¾ãã
ããããæ代ã¯æµããåæ£åãªãã¸ããªã主æµã¨ãªãã
ç§èªèº«ãæ°å¹´åãã使ãåºããGitã«æ
£ãã¦ãã¾ã£ãã®ããã£ã¦ã
ããSubversionã«ã¯æ»ãããããã¾ãã(´-Ï-)
ã¡ããã©ããã¡ãã®ã³ã©ã ã«ããããªè©±ã
WEB+DB PRESS ç·éç·¨ [Vol.1?60]
- ä½è : 森ç°åµ,cho45,ããã¯,å¢äºä¿ä¹,å±±æ¬é½å¹³,è§è°·ä¿¡å¤ªé,ä¸å³¶æ,縣ä¿è²´,大å¡ç¥æ´,ä¼è¤ç´ä¹,å°é£¼å¼¾,WEB+DB PRESSç·¨éé¨
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2011/10/15
- ã¡ãã£ã¢: 大åæ¬
- è³¼å ¥: 52人 ã¯ãªãã¯: 724å
- ãã®ååãå«ãããã° (43件) ãè¦ã
ç¾å¨éçºä¸ã®ã·ã¹ãã ã¯Gitã§ç®¡çãã¦ããã®ã§ã
社å
ã®ç°å¢ãæ¹ãã¦æ´åããã«ãããã
svnç¨ã®ç°å¢ãå度ä½ãã®ã¯é¢åã ãªã»ã»ã»ã¨
ã¨ã¯ãããæ¢åã·ã¹ãã ã®ã³ã¼ãã¯svnã§ç®¡çããã¦ããã
ããã«ã¯å¤§éã®ãè¨é²ãããæ´å²ããæ®ã£ã¦ããã®ã§ã
ãããæ¨ã¦ãããã«ãããã¾ãã
ä¾ã«ãã£ã¦åç½®ããé·ããªãã¾ãããã
svnããgitã«ãªãã¸ããªã移è¡ããã¨ãã®æé ãã¡ã¢ãã¦ããã¾ã...Ï(ï½¥Ïï½¥ï½)
æ¦è¦
å
·ä½çãªããæ¹ã¯ä»¥ä¸ãè¦ã¦ãããã®ã確å®ã§ã
svn の repository を git の repository に変換する方法 | 株式会社メッサリバティ
åºæ¬çã«ã¯git-svnã使ãã°ããããã§ããã
é©å½ã«ããã¨trunk / branch / tagsã®æ
å ±ã失ããã¦ãã¾ãã¾ã
ï¼ä»ã®è¨äºãè¦ã¦é©å½ã«ãã£ã¦ã¿ã¦ãé ãæ±ããã¨ããã»ã»ã»ï¼
大éæãªæµãã¨ãã¦ã¯ä»¥ä¸ã®éãã§ã
- autherå¤æå®ç¾©ãã¡ã¤ã«ãä½ã
- svnãªãã¸ããªããgitã§ã³ã¼ããå¼ã£å¼µãåºã
- localã«ä½æ¥ç¨ãªãã¸ããªãåã
- svnã®trunkãä½æ¥ãªãã¸ããªã®masterã¨ãã¦push
- svnã®branchãä½æ¥ãªãã¸ããªã®branchã¨ãã¦push
- svnã®tagsãä½æ¥ç¨ãªãã¸ããªã®tagã¨ãã¦push
- ä½æ¥ãªãã¸ããªã丸ãã¨ã©ããã«ã³ãã¼ããããã©ããã®remoteã¸push
以ä¸ãé©å½ãªä½æ¥ãã£ã¬ã¯ããªã§ããã¾ã
cd ~/gittemp
ã¦ã¼ã¶å¤æå®ç¾©
ã¾ããauthers.txtãä½ãã¾ã
ãsvnã®ã¦ã¼ã¶å = gitã®ã¦ã¼ã¶åãã¨ããã ãã®ãã¡ã¤ã«ã§ã
vi authers.txt parrot = parrot <[email protected]>
svnãªãã¸ããªã®clone
次ã«ãsvnãªãã¸ããªããgitå½¢å¼ã§cloneãã¦ãã¾ã
ããgit-svnãã¤ã³ã¹ãã¼ã«ãã¦ãªãå ´åã¯ãå
ã«ãã£ã¦ããã¾ããã
ï¼CentOS5.xã®å ´åã¯rpmforgeã«gitã¨git-svnãããï¼
sudo yum install git-svn git svn clone -A authers.txt -s [svn-repo-path] [git-repo-name]
ã-sããã¤ããã®ãæ大ã®ãã¤ã³ãã§ã
以ä¸ã®å¦çãè¡ããã¾ã
- æå¾ã«svn-commitããtrunk or branchãmasterã¨ãã¦clone
- ãããåé¡
- svn-trunkãremote-branchã¨ãã¦å®ç¾©
- svn-branchãremote-branchã¨ãã¦å®ç¾©
- svn-tagsããtags/xxxãã¨ããremote-branchã¨ãã¦å®ç¾©
- remote-branchã¯ãgit branch -rãã§è¦ãã
æå¾ã«svn-commitããã®ãtrunkãªãåé¡ãªãã®ã§ããã
branchã ã£ãå ´åããã¡ãããgit-masterãã¨ãã¦æ±ã£ã¦ãã¾ãã®ã§ã
ãã®ã¾ã¾pushããã¨å¤§æ¨äºã«ãªãã¾ãΣ(ï¾Ðï¾ï¼â¡ï¼ï¾Ð´ï¾)
ä½æ¥ç¨ãªãã¸ããªä½æ
ã¨ãããããlocalã§pushããããã®æ°è¦ãªãã¸ããªãåãã¾ã
git init --bare [local-repo-name]
ãgit init --bareãã¯remoteã§ä½¿ããªãã¸ããªãä½ãå ´åã®ãç´æã§ãã
ãããcloneãããªãã¸ããªã«addãã¾ããã
cd [git-repo-name] git remote add origin [local-repo-path]
ãæ£ããæ§æãããã®ãoriginãã«pushãã¦ããã¾ã
svn-trunkãgit-masterã¨ãã¦push
å
ã»ã©ãæ¸ããããã«ãcloneãã¦ããmasterã¯ã
å¿
ãããsvnã®trunkã¨ã¯éãã¾ãã
ããã§ãremoteã®trunkãlocalã«å¼ã£å¼µã£ã¦ãã¦ã
ãããmasterã¨ãã¦originã«pushãã¾ã
git branch local-trunk refs/remotes/trunk git push origin local-trunk:master
svn-branchãgit-branchã¨ãã¦push
ä»ã®branchã«ã¤ãã¦ãåºæ¬ã¯åãã§ã
ãã£ããlocalã«å¼ã£å¼µã£ã¦ãã¦ãgitã®branchã¨ãã¦pushãã¾ã
å
¨ã¦ã®branchã«ã¤ãã¦åãä½æ¥ãç¹°ãè¿ãã¾ã
git branch local-hoge-branch refs/remotes/hoge-branch git push origin local-hoge-branch:hoge-branch
svn-tagsãgit-tagã¨ãã¦å®ç¾©
svnã®tagsã¯branchã®ä¸ç¨®ã§ããã
ãããgitã®tagã¨ãã¦å®ç¾©ãç´ããæå¾ã«ã¾ã¨ãã¦pushãã¾ã
git tag hoge-tag refs/remotes/tags/hoge-tag git tag piyo-tag refs/remotes/tags/piyo-tag ⦠git push --tags
ä½æ¥ãªãã¸ããªã®ã³ãã¼
ããã¾ã§ããã°ãorigin=local-repoã«
綺éºãªæ§æã®gitãªãã¸ããªãã§ãã¦ãã¾ã
ãã¨ã¯ããããµã¼ãã«ä¸¸ãã¨ã³ãã¼ãããªãã
ã©ããã®remoteã«pushããã°çµããã§ã