Positive experience report porting from StHub to GitHub

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Positive experience report porting from StHub to GitHub

hernanmd
Hi guys,

I just want to report that I started to migrate some of my projects
from to GitHub (for example
https://github.com/hernanmd/ApplicationSecurity and
https://github.com/hernanmd/StringExtensions) in Pharo 6.x

Basically the steps are:

1) Install the Peter Uhnak git-migration package:

Metacello new
baseline: 'GitMigration';
repository: 'github://peteruhnak/git-migration/repository';
load

2) From (GitBash) command-line:

cd /c/Users/{your_git_project_directory}
git log --oneline -n 1

3)  Execute this script:

| migration |
migration := GitMigration on: '{your_sthub_user}/{project_name}'.
migration cacheAllVersions.
migration authors: { 'Your_Name' -> #('Your_Name' '<[hidden email]>')}.
migration
fastImportCodeToDirectory: 'repository'
initialCommit: '....' " copy/paste the id from the git log command in step 2)"
to: 'import.txt'

4)

git fast-import < /.../import.txt
git reset --hard master
git add *
git commit -m "fast-import from SmalltalkHub"
git push {project_name}

or

git push


Let me know if there's something you would add to the workflow.
Cheers,

Hernán

Reply | Threaded
Open this post in threaded view
|

Re: Positive experience report porting from StHub to GitHub

Peter Uhnak
Hi Hernan, this should be in principle sufficient for the migration.

I just wonder, why these two lines?
git add *
> git commit -m "fast-import from SmalltalkHub"

...normally all the code should've been already committed via fast-import.

Peter

On Wed, Jan 24, 2018 at 2:17 PM, Hernán Morales Durand <[hidden email]> wrote:
Hi guys,

I just want to report that I started to migrate some of my projects
from to GitHub (for example
https://github.com/hernanmd/ApplicationSecurity and
https://github.com/hernanmd/StringExtensions) in Pharo 6.x

Basically the steps are:

1) Install the Peter Uhnak git-migration package:

Metacello new
baseline: 'GitMigration';
repository: 'github://peteruhnak/git-migration/repository';
load

2) From (GitBash) command-line:

cd /c/Users/{your_git_project_directory}
git log --oneline -n 1

3)  Execute this script:

| migration |
migration := GitMigration on: '{your_sthub_user}/{project_name}'.
migration cacheAllVersions.
migration authors: { 'Your_Name' -> #('Your_Name' '<[hidden email]>')}.
migration
fastImportCodeToDirectory: 'repository'
initialCommit: '....' " copy/paste the id from the git log command in step 2)"
to: 'import.txt'

4)

git fast-import < /.../import.txt
git reset --hard master
git add *
git commit -m "fast-import from SmalltalkHub"
git push {project_name}

or

git push


Let me know if there's something you would add to the workflow.
Cheers,

Hernán


Reply | Threaded
Open this post in threaded view
|

Re: Positive experience report porting from StHub to GitHub

hernanmd
Hi Peter,

2018-01-24 11:50 GMT-03:00 Peter Uhnák <[hidden email]>:
> Hi Hernan, this should be in principle sufficient for the migration.
>
> I just wonder, why these two lines?
>> git add *
>> git commit -m "fast-import from SmalltalkHub"
>
> ...normally all the code should've been already committed via fast-import.
>

I will check again with another project, but at first didn't see
anything uploading after the fast-import.
I will let you know, thank you.

Hernán


> Peter
>
> On Wed, Jan 24, 2018 at 2:17 PM, Hernán Morales Durand
> <[hidden email]> wrote:
>>
>> Hi guys,
>>
>> I just want to report that I started to migrate some of my projects
>> from to GitHub (for example
>> https://github.com/hernanmd/ApplicationSecurity and
>> https://github.com/hernanmd/StringExtensions) in Pharo 6.x
>>
>> Basically the steps are:
>>
>> 1) Install the Peter Uhnak git-migration package:
>>
>> Metacello new
>> baseline: 'GitMigration';
>> repository: 'github://peteruhnak/git-migration/repository';
>> load
>>
>> 2) From (GitBash) command-line:
>>
>> cd /c/Users/{your_git_project_directory}
>> git log --oneline -n 1
>>
>> 3)  Execute this script:
>>
>> | migration |
>> migration := GitMigration on: '{your_sthub_user}/{project_name}'.
>> migration cacheAllVersions.
>> migration authors: { 'Your_Name' -> #('Your_Name'
>> '<[hidden email]>')}.
>> migration
>> fastImportCodeToDirectory: 'repository'
>> initialCommit: '....' " copy/paste the id from the git log command in step
>> 2)"
>> to: 'import.txt'
>>
>> 4)
>>
>> git fast-import < /.../import.txt
>> git reset --hard master
>> git add *
>> git commit -m "fast-import from SmalltalkHub"
>> git push {project_name}
>>
>> or
>>
>> git push
>>
>>
>> Let me know if there's something you would add to the workflow.
>> Cheers,
>>
>> Hernán
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Positive experience report porting from StHub to GitHub

hernanmd
Ok, checked again with a new repo at https://github.com/hernanmd/ISO3166
And yes, the commit command is unnecessary, the fast-import and push did it.
Thanks,

Hernán



2018-01-24 18:08 GMT-03:00 Hernán Morales Durand <[hidden email]>:

> Hi Peter,
>
> 2018-01-24 11:50 GMT-03:00 Peter Uhnák <[hidden email]>:
>> Hi Hernan, this should be in principle sufficient for the migration.
>>
>> I just wonder, why these two lines?
>>> git add *
>>> git commit -m "fast-import from SmalltalkHub"
>>
>> ...normally all the code should've been already committed via fast-import.
>>
>
> I will check again with another project, but at first didn't see
> anything uploading after the fast-import.
> I will let you know, thank you.
>
> Hernán
>
>
>> Peter
>>
>> On Wed, Jan 24, 2018 at 2:17 PM, Hernán Morales Durand
>> <[hidden email]> wrote:
>>>
>>> Hi guys,
>>>
>>> I just want to report that I started to migrate some of my projects
>>> from to GitHub (for example
>>> https://github.com/hernanmd/ApplicationSecurity and
>>> https://github.com/hernanmd/StringExtensions) in Pharo 6.x
>>>
>>> Basically the steps are:
>>>
>>> 1) Install the Peter Uhnak git-migration package:
>>>
>>> Metacello new
>>> baseline: 'GitMigration';
>>> repository: 'github://peteruhnak/git-migration/repository';
>>> load
>>>
>>> 2) From (GitBash) command-line:
>>>
>>> cd /c/Users/{your_git_project_directory}
>>> git log --oneline -n 1
>>>
>>> 3)  Execute this script:
>>>
>>> | migration |
>>> migration := GitMigration on: '{your_sthub_user}/{project_name}'.
>>> migration cacheAllVersions.
>>> migration authors: { 'Your_Name' -> #('Your_Name'
>>> '<[hidden email]>')}.
>>> migration
>>> fastImportCodeToDirectory: 'repository'
>>> initialCommit: '....' " copy/paste the id from the git log command in step
>>> 2)"
>>> to: 'import.txt'
>>>
>>> 4)
>>>
>>> git fast-import < /.../import.txt
>>> git reset --hard master
>>> git add *
>>> git commit -m "fast-import from SmalltalkHub"
>>> git push {project_name}
>>>
>>> or
>>>
>>> git push
>>>
>>>
>>> Let me know if there's something you would add to the workflow.
>>> Cheers,
>>>
>>> Hernán
>>>
>>