【1】新建github仓库
【2】本地克隆并提交
$ git clone https://github.com/TomJourney/soil.git
Cloning into 'soil'...
warning: You appear to have cloned an empty repository.pacoson@DESKTOP-E4IASRJ MINGW64 /d/github/TomJourney/soil (master)
$ git add readme.txtpacoson@DESKTOP-E4IASRJ MINGW64 /d/github/TomJourney/soil (master)
$ git commit -m 'readme'
[master (root-commit) 48d822d] readme1 file changed, 1 insertion(+)create mode 100644 readme.txtpacoson@DESKTOP-E4IASRJ MINGW64 /d/github/TomJourney/soil (master)
$ git remote add origin https://github.com/TomJourney/soil.git
fatal: remote origin already exists.pacoson@DESKTOP-E4IASRJ MINGW64 /d/github/TomJourney/soil (master)
$ git push -u origin main
error: src refspec main does not match any.
error: failed to push some refs to 'https://github.com/TomJourney/soil.git'pacoson@DESKTOP-E4IASRJ MINGW64 /d/github/TomJourney/soil (master)
$ git push -u origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 255 bytes | 255.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/TomJourney/soil.git* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.