Using Plastic SCM to sync with the junior github repo

January 15, 2013

Update 2014/08/02: This blog post was written before GitSync was finally released. Now it is a key part of Plastic SCM 5.0 and higher and it is available out of the box.

We’re currently testing our bi-directional integration with Git, which basically enables Plastic to directly push and pull changes (and solve conflicts) to a Git repository. It is not a script, it is not limited to a single branch, it doesn’t require you to call the sysadmin to add a file or any of the other niceties that we’ve just seen in other “git connectors”. :S

As I explained a few months ago we have implemented the git protocol, so Plastic is able to connect directly to a Git server. That’s all.

Connecting to a trendy repo

If you go to github and browse the repos today, you’ll probably find something like a list of “trendy” repos. I’ve selected one of them which turned out to be the “junior” repository:

Now, to pull it to Plastic I’ve created a repo to “host it” (called junior too) and went to the initially empty branch explorer, then to the context menu option to launch the sync with git:

Then you launch the “sync” dialog (which is very similar to the replication dialog to push/pull changes between Plastic servers) and enter the URL of the git repo:

No need for credentials now since we’re just pulling (cloning) from a public repo. You’ll need to specify them in case you need to push and then the server requires you to be an authenticated user.

Just press “Sync” and the process will start up as follows:

You’re currently pulling git changesets and branches directly to your local Plastic SCM repository.

Browsing

Refresh the branch explorer and you’ll be able to render the just imported git changesets a typical Plastic SCM way:

And now, right-clicking on any changeset (commit in git jargon), you’ll be able to check differences with our built-in diff system.

What can you do next?

From here you can create more changes in Plastic, branches, merges, anything, then repeat the same process to sync to git (which will in turn push or pull changes and even ask you to solve merges before pushing back to git if concurrent changes were done on the same branches).

Want to give it a try?

Just download Plastic SCM 5.0 and higher to run GitSync.

Enjoy!



2 comments :

Caue C M Rego said...

I just couldn't find that "Replication" option there. Or anywhere! Using 5.0.43.504

pablo said...

Hi!

It is just in the replication menu, both in the Branch Explorer and in the branches view.

It is available since 5.0, so you should have it. Anyway, give a try to one of the latest 5.0 releases or even 5.4.

Real Time Web Analytics