Install the extension from the link -
For chrome:
https://chrome.google.com/webstore/detail/le-git-graph-commits-grap/joggkdfebigddmaagckekihhfncdobff
For Firefox:
https://addons.mozilla.org/firefox/addon/le-git-graph-github-git-graph/
After installation, open any GitHub repository and a new 'Commits' tab will be visible.
Open the commits tab and follow the prompt to authenticate with your GitHub account.