Create a git in the remote git, copy the address generated, then proceed.
1. Cd into project directory
2. In command line window type in :
git init
3. Add files or directories into workspace:
git add main.go
4. Commit :
git commit -m "this is the comment"
5. Add remote git:
git remote add origin xxxxxx(adress of git)
6. Push:
git push -u origin master
Then type in user name and password. Done!