This is my shortest possible explanation, I am glad if someone finds this post useful.
For Win and Mac user you can find instructions here, on the original GitHub documentation.
gitignore
files. You can add these files after your project has been pushed to GitHub.git init
Add the files to the local repository. This stages (prepare) them for the first commit.
git add . # To unstage a file, use 'git reset HEAD YOUR-FILE'.
git commit -m "First commit" # Commits the tracked changes and prepares them to be pushed to a remote repository. # To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again.
# Sets the new remote git remote add origin "remote repository URL" # Verifies the new remote URL git remote -v
git push origin master # In case on error add -f option to force