Below is a simple example for three files. Separate groups are created in all three files, but in the third file a button is added to the group of the first file.
1st file:
	<customUI  xmlns="http://schemas.microsoft.com/office/2006/01/customui"
            xmlns:nsWb1="My Shared Tab">
    <ribbon
        startFromScratch="false">
        <tabs >
            <tab 
                idQ="nsWb1:QMySharedTab"
                insertBeforeMso="TabHome"
                label="My Shared Tab" >
                <group 
                    idQ="nsWb1:QGroup1"
                    label="Group 1"
                    visible="true">
                    <button 
                        id="Button1"
                        label="Button1 in Group1"
                        visible="true"
                        onAction="Button1_onAction"/>
                </group >
            </tab >
        </tabs >
    </ribbon >
</customUI >
 
2nd file:
	<customUI  xmlns="http://schemas.microsoft.com/office/2006/01/customui"
            xmlns:nsWb2="My Shared Tab">
    <ribbon
        startFromScratch="false">
        <tabs >
            <tab 
                idQ="nsWb2:QMySharedTab"
                insertBeforeMso="TabHome"
                label="My Shared Tab" >
                <group 
                    idQ="nsWb2:QGroup2"
                    label="Group 2 from Wkb2"
                    visible="true">
                    <button 
                        id="Button2"
                        label="Button2 in Group2"
                        visible="true"
                        onAction="Button2_onAction"/>
                </group >
            </tab >
        </tabs >
    </ribbon >
</customUI >
 
3th file:
	<customUI  xmlns="http://schemas.microsoft.com/office/2006/01/customui"
            xmlns:nsWb3="My Shared Tab">
    <ribbon
        startFromScratch="false">
        <tabs >
            <tab 
                idQ="nsWb3:QMySharedTab"
                insertBeforeMso="TabHome"
                label="My Shared Tab" >
                <group 
                    idQ="nsWb3:QGroup3"
                    label="Group 3 from Wkb3"
                    visible="true">
                    <button 
                        id="Button3"
                        label="Button3 in Group3"
                        visible="true"
                        onAction="Button3_onAction"/>
                </group >
                <group 
                    idQ="nsWb3:QGroup1"
                    label="Group 1"
                    visible="true">
                    <button 
                        id="Button4"
                        label="Button 4 from Wkb3"
                        visible="true"
                        onAction="Button4_onAction"/>
                </group >
            </tab >
        </tabs >
    </ribbon >
</customUI >