Github repo can be added globally via Administration > Applications > DVCS accounts. This will enable the repo for all future projects.
Alternatively it can be added separately for each projects in Project Settings > Developer tools.
Create a new project and test issue in Jira and then do a test commit with commit message beginning with issue key e.g.
git commit -m "ISSUE-1 add file"
You may need to refresh the repo to show the change (Administration > Applications > DVCS accounts)
You should see a new commit on the issue.
Before migrating to cloud (or after), install the Github for Jira app and configure it to connect to your Github repo. You may need to select “Full” retry sync to see the commits/branches.