User:Llocsin: Difference between revisions
From SCECpedia
Jump to navigationJump to search
No edit summary |
|||
| Line 8: | Line 8: | ||
#Create Text Document of Authors to link to Git Accounts | #Create Text Document of Authors to link to Git Accounts | ||
##create authors.txt | ##create authors.txt | ||
add in all authors with the following format: | ##add in all authors with the following format: | ||
jcoglan = James Coglan <jcoglan@never-you-mind.com> | ###jcoglan = James Coglan <jcoglan@never-you-mind.com> | ||
stnick = Santa Claus <nicholas@lapland.com> | ###stnick = Santa Claus <nicholas@lapland.com> (Recommended to link everyone’s account but if you can’t, it’s not required to link everyone’s account, but you must provide an email, if only a made up one.) | ||
#Convert the repositories with the git commands: | |||
Convert the repositories with the git commands: | ##$ svn2git http://source.usc.edu/svn/mesh_partitioner/ --trunk trunk --tags tags --nobranches --authors ~/authors.txt (Note: --trunk trunk (the trunk argument is the name of the trunk repository-tags tags (tags is the name of your repository of tags)) | ||
$ svn2git http://source.usc.edu/svn/mesh_partitioner/ --trunk trunk --tags tags --nobranches --authors ~/authors.txt | #Push to the desired git remote. (In this example we use github) | ||
Note: --trunk trunk (the trunk argument is the name of the trunk repository | ##Add Remote##git remote add <remote-name> <remote-url>##git remote origin git@github.com:SCECcode/CyberShake.git | ||
-tags tags (tags is the name of your repository of tags) | |||
Push to the desired git remote. (In this example we use github) | |||
Add Remote | |||
git remote add <remote-name> <remote-url> | |||
git remote origin git@github.com:SCECcode/CyberShake.git | |||
Commit | Commit | ||
git add . | git add . | ||
Revision as of 20:52, 31 July 2020
SVN to Git Plan
- Convert SVN repository to a Git Repository.
Steps:
- Download svn2git tool: https://github.com/nirvdrum/svn2git
//Add Commands Pull desired SVN repository
//Add Commands
- Create Text Document of Authors to link to Git Accounts
- create authors.txt
- add in all authors with the following format:
- jcoglan = James Coglan <jcoglan@never-you-mind.com>
- stnick = Santa Claus <nicholas@lapland.com> (Recommended to link everyone’s account but if you can’t, it’s not required to link everyone’s account, but you must provide an email, if only a made up one.)
- Convert the repositories with the git commands:
- $ svn2git http://source.usc.edu/svn/mesh_partitioner/ --trunk trunk --tags tags --nobranches --authors ~/authors.txt (Note: --trunk trunk (the trunk argument is the name of the trunk repository-tags tags (tags is the name of your repository of tags))
- Push to the desired git remote. (In this example we use github)
- Add Remote##git remote add <remote-name> <remote-url>##git remote origin git@github.com:SCECcode/CyberShake.git
Commit git add . git commit -m “Initial Commit of Converted SVN to Git Repository Code” Use tags command git push --tags
Resources:
svn2git tool (from the guide): https://github.com/nirvdrum/svn2git
Official Git Documentation:
Guide: https://viastudio.com/migrate-svn-git/: https://github.github.com/training-kit/downloads/subversion-migration/
Github Importer Tool (alternate): https://docs.github.com/en/github/importing-your-projects-to-github/about-github-importer