u/Heldshi

▲ 0 r/git

The best way to synchronize files across repos in Gitlab?

Hey guys, I'm looking for a good way to synchronize one file across multiple repos in Gitlab. To be more precise:

• I have to synchronize only a single exact .xml file across repos

• The file is located at different paths in each repo (so I don't think submodules are the most optimal way), for example:

• \`repo\_root/def.xml\`

• \`repo\_root/msg\_definitions/v1.0/def.xml\`

• \`repo\_root/msgs/def.xml\`

• We have a separate main repo that holds only this file and serves as the ground truth

Of course I can make it as a submodule, but in that case I'll have to modify Makefiles, CMakeLists, etc. So what is the best way to handle this task:

• in the easiest way for me

• so that almost nothing changes for my colleagues in their workflow

• so that it’s as safe as possible and doesn’t cause git conflicts (if implemented via Gitlab CI)

reddit.com
u/Heldshi — 3 days ago