Jump to content
Aki Kanerva

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

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!

 

Share this post


Link to post
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

Share this post


Link to post
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

 

Share this post


Link to post
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.

Share this post


Link to post
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

×
×
  • Create New...