local:
First initialize a repository in your local git init, then git add . to package all files into the repository, git -commit -m "first_commit"
At this point there is nothing, you need to git add
GitHub:
Type this command in your local repository, and your local code will be synced to GitHub