Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Best practice to sync only specific files from repositories


I have access to 10 different repositories from our Dev team. From each of the repository I need only one specific file. Each specific file from the repositories will be used by team members or tools who are not allowed to have access to those 10 repositories.

Therefore I'm planning to create another repository which contains each specific file from the 10 repositories. This way it's easier to provide access to these files to team members and tools.

My problem is that these files have to be always up-to-date. If one of the files was updated in one of the 10 repositories it also needs to be automatically updated in my repository.

I wanted to ask what the best practice is to make this process work?

I'm grateful for any advice. Thank you!



1 answer

That depends on the required access level (read/write/delete), your technology stack and use cases (for example, what happens if one of the files is updated while a user reads it).

For the most simple case, if the systems/users just need read access and you don't care about updates during read, you can use either:

1. Third parties like BitBucket pipelines or ArgoCD, to listen to changes and update the dedicated repo.

2. Have a small service which only returns the specific files directly from BitBucket. See here for a simple CURL example:

3*. This one is more cumbersome but it eliminates the file duplication so I'm putting it here -  use submodule or sub-tree. See here:  

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events