一、Git的安装和下载
https://git-scm.com/
进入官网,选择合适的版本下载
二、Github仓库创建
点击右上角New新建一个即可
三、本地项目上传
1、进入 要上传的项目目录,右键,选择Git Bash Here,进入终端Git
2、初始化临时仓库
git init
对应的文件中就有.git文件,修改其中的config文件,加上名称,就是你github的名称,以及邮件
3、将文件加入到临时仓库
git add *
使用git statu可以查看状态
4、提交信息
git commit -m "stream"
引号中是你写的提交信息
5、连接远程仓库
git remote add origin https://github.com/seeding-sun/stream-export.git
这里的url就是你新建仓库中的
6、拉取
git push -u origin master
传输完成后,在master分支中就可以看到传到github中的代码了
四、可能的错误
1、 fatal: unable to access 'https://github.com/seeding-sun/yolo11.git/': Failed to connect to github.com port 443 after 2072 ms: Connection refused
跟代理设置有关
解决方案:
代理设置相关
参考:
B站:手把手教你在github上传文件