Jump to content

[Resolved] One-time import of Git bare repo into Plastic Cloud


Aki Kanerva
 Share

Recommended Posts

Hi there,

New user here, trying to figure out how to migrate an existing Git repo into Plastic Cloud. This is just a one-time operation, I don't need to sync anything with Git after the initial import.

I have a local Git repo in bare format, exported with the git clone --mirror command. How do I use this package as the basis of a new Plastic Cloud repo?

Thanks in advance!

 

Link to comment
Share on other sites

Hi Aki,

There are different possibilities to import a git repo to Plastic:

https://www.plasticscm.com/features/plasticscm-for-git-users

- You can create a git fast-export package of your repo and then this package can me imported into Plastic.

- You can use GitSinc. In order to use this option, your git repo should be located on a Git server.

Regards,

Carlos.

  • Thanks 1
Link to comment
Share on other sites

Thanks Carlos! Still need some further assistance though.

Following the example in the help page for fast-export, I exported the bare repo using the following command (took about an hour and a half):

git fast-export --all -M --signed-tags=strip --tag-of-filtered-object=drop > export.dat

Then I tried using this command to import it:

cm fast-import PlasticRepoName ..\GitRepo.git\export.dat

And received this output:

 ]uldn't process command [??b l o b
 ]ror: Couldn't process command [??b l o b

 

Link to comment
Share on other sites

Ah, I figured it out! I changed from PowerShell to Command Prompt, and things started working. Git produced the export in a matter of minutes, and the file size was a little less than half of what was generated when using Powershell. I'm guessing PowerShell insisted on using UTF-8 encoding or something weird.

Link to comment
Share on other sites

  • 2 years later...

I'm glad that I saw this post. PowerShell messes up git exports so badly, it should probably be noted in the docs. The only time I've ever done a git export was for this. I thought it was weird that the PowerShell export took hours and produced a ~50GB file for an ~30GB repo. Doing everything on the normal command prompt produced a ~30GB file in less than a minute and I don't get that weird "]uldn't process command [??b l o b" error when importing.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...