Put Jira issues in the commit comments, then use a plugin to link the commits to the actual Jira.
Our commit messages start with:
JIRA: XBVS-1222 Fixes bugs... For example, then hooks between bitbucket and jira link the commits to the jira. Then it's easy to see which Jira it relates to in eclipse for example, by right clicking on the row number and selecting "Show revision history" I think it's called in eclipsethat anyway. Your Jira issue number and comments will be highlighted alongon the row number barcolumn, and hovering with the mouse will give you the details.