赞
踩
cat@cat MINGW64 ~
$ cd d:
cat@cat MINGW64 /d
$ cd learngit/
cat@cat MINGW64 /d/learngit (main)
$ git remote add origin git@github.com:Doraemon12138/learngit.git //本地仓库和github进行关联
cat@cat MINGW64 /d/learngit (main)
$ git push -u origin master //本地库的所有内容推送到远程库上,但这里应该是main,因为git更新了,现在github的默认分支为main
error: src refspec master does not match any
error: failed to push some refs to 'github.com:Doraemon12138/learngit.git'
cat@cat MINGW64 /d/learngit (main)
$ git pull // 还要先进行git pull!!!,第一次会出现以下内容
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> main
cat@cat MINGW64 /d/learngit (main)
$ git push -u origin main //推送成功以后就是这样的
Enumerating objects: 12, done.
Counting objects: 100% (12/12), done.
Delta compression using up to 8 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (12/12), 2.55 KiB | 2.55 MiB/s, done.
Total 12 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
To github.com:Doraemon12138/learngit.git
* [new branch] main -> main
branch 'main' set up to track 'origin/main'.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。