Jump to content

GitSync - Replicated changesets merge issue


SDSChad

Recommended Posts

Hello, I think I did something wrong, but I'm not sure exactly what yet. I recently did a git sync from Plastic and it told me that I needed to merge with the changes from Git, even though I had not made any direct changes to the git repo (all changes were performed through Plastic). Here are the steps that I followed:

Machine A:

1. Created initial checkin along with a handful of other ones to main.

2. Synchronized all changes to my gitsync git repo.

Machine B:

3. Made a few more checkins to main through Plastic. 

4. Synchronized all changes to my gitsync git repro.

After step 4, Plastic told me that my git repo had changed and that I need to merge. My branch explorer is attached and the red lines show changesets that are identical between the two (the bottom track was newly added by the git sync operation mentioned in step 4), but are somehow now needing to be merged. 

My question is if this is expected behavior? Should I just merge those identical changesets in, or did I do something improperly when switching between machines? Any help would be appreciated!

Thank you,

Chad

 

gitsync_issue.png

Link to comment
Share on other sites

Hi @SDSChad,

When you run an initial Gitsync operation, one the repos involved always need to be empty.

The problem is:

Quote

 

Machine B:

3. Made a few more checkins to main through Plastic. 

4. Synchronized all changes to my gitsync git repro.

 

In the Machine B, you don't have any previous GitSync mappings. This machine is not aware of the previous GitSync performed in Machine A. When you sync the git repo, the commits are duplicated into your Plastic repo (at the end of the day breaking the repo).  Machine B doesn't know that there was a previous sync.

You will need to manually remove the duplicated changesets.

Summary:

- Always perform the GitSync from the same machine.

- If you want also do it from a different machine, you will need to use a clean new repo for the initial sync. These ways, the mappings will be also generated in the new machine (and not changesets will be duplicated).

Regards,

Carlos.

 

 

Link to comment
Share on other sites

Ah, I see now. I deleted the duplicated changesets and performed the gitsync from Machine A and everything is working as expected. Thank you for the information! 

On a related note, my primary reason for using GitSync is to interface with Unity Cloud Build. Is there a preferred way to lobby Unity for Plastic support? 

Best,

Chad

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...