This is a VERY broad question because the best way to do something relates to circumstance, and in the world of software development there is a very wide variety of circumstances. The problem is that you haven't actually mentioned your circumstances at all, which is going to make it very difficult to answer your question without writing an essay.
Generally speaking, the "best" way to ensure JIRA integrates fairly seamlessly with the other components you are relying on for your repository management is to use other Atlassian products as these have been developed with the intention of integrating with JIRA. However, more information about your particular situation and what level of integration you require would help people to answer this question more effectively.
All the best,
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot