You connect your Learn account with GitHub when you complete your first lab that is not in the Welcome track (meaning the lab where you simply have to edit a file does not count).
Here are the labs where you connect your GitHub account for some of our most popular intro tracks:
Bootcamp Prep - From DOM to Node and the IDE
Intro to Ruby - Welcome to TicTacToe
For more about why we connect with GitHub, check out this article: Connecting GitHub with Learn