Jump to content

Undo gitsync in Plastic SCM


Sam

Recommended Posts

Hi everybody,

I'm afraid I did a big mistake on one of my repo.

I have a repo called "My_repo_A" which has a XLinked sub repo called "My_repo_A_shares". This sub repo "My_repo_A_shares" is synced with a repo on github.

But tonight, after a hard work week, I synced by mistake the parent repo "My_repo_A" with the same repo on github. That resulted in a warning like "the branches have to be merged before being able to push with gitsync again ...". Hopefully there are no problems on github, but in plastic a lot of commits are duplicated with different guid, and branches have two heads ...

So ... the winner is me ! I know ... but is there a way to cancel a gitsync ?

Thanks a lot for your help.

Link to comment
Share on other sites

Hi Carlos,

The sub-repo synced with github is OK, but it's the "parent" plastic repo that has been accidentally sinced with github mirror image of its child repo. There is no github image of the parent repository.

Perhaps there's a way to detect all the commit that come from gitsync and delete them ?

Sincerly

Sam T.

Link to comment
Share on other sites

Hi,

If you open the branch explorer, are you able to determine the duplicated changesets? How many duplicated changesets are there? It may be difficult to remove all of them one by one :$

Don't you have repo backups?

Also, I don't understand how this scenario could happen. For the GitSync operation, Plastic uses a local mappings folder. This way if a PlasticRepo1 is synced with GitRepo1 and then you try to sync the same repo against GitRepo2, Plastic doesn't allow it to prevent rewriting the history or duplicating changesets.

Once you sync a Plastic repo with a Git repo, you cannot choose to sync a different one.

Regards,

Carlos.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Carlos,

I finally deleted all the wrong commits by hand. Hopefully all the changesets numbers were consecutive (even all was mixed up in the timeline) so it was not that hard to detect them.

On 4/16/2019 at 6:40 PM, calbzam said:

Also, I don't understand how this scenario could happen. For the GitSync operation, Plastic uses a local mappings folder. This way if a PlasticRepo1 is synced with GitRepo1 and then you try to sync the same repo against GitRepo2, Plastic doesn't allow it to prevent rewriting the history or duplicating changesets. 

Once you sync a Plastic repo with a Git repo, you cannot choose to sync a different one.

There's a protection against two GitRepos to be synced on one Plastic repo, not against what I did by mystake : two PlasticRepos synced with the same GitRepo, moreover one of the two PlasticRepo was a submodule of the other PlasticRepo.

Thanks for help

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
×
×
  • Create New...