cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a suggested way to merge different branches of a TouchGFX project?

Alex K.
Associate II

Hi all,

we were working on two different feature branches an now run into some problems merging the Designers project file (*.touchgfx).

Merging the graphical parts worked out well, but when it comes to texts, merging is not possible that easy.

Especially SingleUseIDs are generated independently in those two feature banches (obviously), so merging mixes up our texts.

Is there a suggested way to collaborate in teams with the TouchGFX Designer?

Best Regards,

Alex

4 REPLIES 4
cameronf
Senior

The current rules I have for branching and merging projects using touchgfx are

  • Limit any concurrent gui work in different branches to work on different screens (don't think this is actually necessary but makes merging .touchgfx json less issue prone)
  • Don't use SingleUse texts. Create named resources for every text to avoid the issue you mentioned of duplicate IDs when merging
  • Manually merge texts.xlsx when doing you merge, appending all the text resources added in one branch to the end of the other

Would also be interested in hearing from others on their workflow.

Martin KJELDSEN
Chief III

Hi @AK.12.​,

I'm surprised we don't get this question more often. @Community member​ makes some good points here and those are the main problems - Merging of json and merging of the text sheet (.xlsx).

Sometimes we'll start off a project by identifying all the possible screens (during design phase) and create those right off the bat so that every subsequent branch won't possibly be creating a conflict in .json because multiple developers are defining new screens.

I'm pretty sure we're also working on getting rid of the excel format into something more easily merged. In that regards, with git, we have previously used a custom .gitattribute solution to allow excel files to be merged using xls2txt - And some have even made scripts to unzip the .xlsx file and diff the xml inside.

Hope that helps.

/Martin

Alex K.
Associate II

Hi cameronf, hi Martin,

the most important part seems to omit SingleUseIDs, got that.

I think, we are going to strictly limit work on texts in parallel in our team in some way.

Like doing the text work first, committing that asap., communicate....

Thanks to both of you,

Alex

Right, that's what we used to do too when we were more involved in customer projects. "Does anyone have any uncommitted changes to the text sheet?" :)