There is a foreman_templates upstream plugin that can be used with git. Recently it got support for plain FS backend which means one could use bitbucket on some directory. Template exporting is being finished right now too so this could address the whole use case. The FS backend and exporting feature will require newer Foreman though.
Created attachment 1317061 [details] foreman_templates in 6.3 foreman_templates can be enabled to synchronize templates. It is a tech preview, therefore not enabled by default. Verified. 6.3.0 snap 12
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:0336