Created
May 11, 2016 06:19
-
-
Save daipresents/05c7c4667d7e80a280a229b2b33b872c to your computer and use it in GitHub Desktop.
4コマでわかるSVNからgitへの移行
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bash | |
$ export SVN_URL=http://daipresents.googlecode.com/svn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ export TAG_NAME=redmine_all_time_team-0.2.0 | |
$ git tag ${TAG_NAME} refs/remotes/tags/${TAG_NAME} | |
$ git push --tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git tag | |
redmine_all_time_team-0.2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd ../googlecode | |
$ git branch | |
* master | |
python-test-branch | |
$ git branch -r | |
$ git tag | |
redmine_all_time_team-0.2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git config remote.origin.url https://github.com/daipresents/googlecode.git | |
$ git push origin master | |
$ git push --all | |
$ git push --tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir svn2git | |
$ cd svn2git | |
$ git svn init -s ${SVN_URL} | |
$ git svn fetch | |
$ cd ../ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir googlecode | |
$ cd googlecode | |
$ git --bare init | |
$ cd ../ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd svn2git | |
$ git remote add origin ../googlecode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git branch local-trunk refs/remotes/trunk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git push origin local-trunk:master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git branch | |
local-trunk | |
* master | |
$ git branch -r | |
origin/master | |
python-test-branch | |
python-test-branch@97 | |
tags/redmine_all_time_team-0.2.0 | |
tags/redmine_all_time_team-0.2.0@71 | |
tags/redmine_daizu-0.4.0 | |
tags/redmine_daizu-0.4.0@53 | |
tags/redmine_roadmaps-0.4.3 | |
tags/redmine_roadmaps-0.4.3@79 | |
trunk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ export BRANCH_NAME=python-test-branch | |
$ git branch local-${BRANCH_NAME} refs/remotes/${BRANCH_NAME} | |
$ git push origin local-${BRANCH_NAME}:${BRANCH_NAME} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git branch -r | |
origin/master | |
origin/python-test-branch | |
python-test-branch | |
python-test-branch@97 | |
tags/redmine_all_time_team-0.2.0 | |
tags/redmine_all_time_team-0.2.0@71 | |
tags/redmine_daizu-0.4.0 | |
tags/redmine_daizu-0.4.0@53 | |
tags/redmine_roadmaps-0.4.3 | |
tags/redmine_roadmaps-0.4.3@79 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment