Changes between Version 24 and Version 25 of DRM4G/Development


Ignore:
Timestamp:
Feb 20, 2017 7:37:00 PM (5 years ago)
Author:
minondoa
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DRM4G/Development

    v24 v25  
    465465
    466466[[Image(merge_pull_request_button.png)]]
     467
     468
     469
     470
     471[[br]]
     472
     473= SVN repository migration to Git =
     474
     475This section exists in case there's a need to convert any other project from '''''Subversion''''' to '''''Git''''', including ''tags'', the same way that has been done for the ''DRM4G'' and ''WRF4G''. There may be better ways of doing it, but this is the only one that we've tested.
     476
     477The program used is called [https://github.com/nirvdrum/svn2git#installation svn2git]. Follow the link to see how to install it.
     478
     479Once installed, you can try to use the options they have listed in [https://github.com/nirvdrum/svn2git#usage usage].
     480
     481* First create a new folder where you want to have your local repository and change into it
     482
     483{{{#!sh
     484mkdir <local_repository_folder>
     485cd <local_repository_folder>
     486}}}
     487
     488* This next command will then '''__convert the whole remote svn repository__''' into a local git repository.
     489 * You'll need the `--username` option since our repository is protected by password.
     490 * This process will take a long time.
     491
     492{{{#!sh
     493svn2git https://meteo.unican.es/svn/repos/WRF4G/ --username <user_name>
     494}}}
     495
     496* When it's done, get into the branch you want to start a project from and rename it as the ''__master__''
     497 * You might have to clean up a bit the root folder, since there might be some folders that shouldn't be there. But they should be empty and should be fine to just delete them.
     498
     499{{{#!sh
     500git checkout <project_branch>
     501rm -rf WRF* #if you need to clean up
     502#if they were empty you won't need to make a commit
     503
     504#rename the project branch
     505git branch -m master old-master
     506git branch -m <project_branch> master
     507}}}
     508
     509* Then push it to our remote repository in '''''!GitHub'''''
     510
     511{{{#!sh
     512git remote add origin https://github.com/SantanderMetGroup/<project_name>.git
     513git push -u origin master
     514}}}
     515
     516* Finally, depending on whether you'll need the rest or not, delete the remaining branches.
     517
     518{{{#!sh
     519git branch
     520git branch -D <every_branch>
     521}}}