Git,本地上传项目到github

一、Git的安装和下载

https://git-scm.com/

进入官网,选择合适的版本下载

二、Github仓库创建

点击右上角New新建一个即可

三、本地项目上传

1、进入 要上传的项目目录,右键,选择Git Bash Here,进入终端Git

2、初始化临时仓库

python 复制代码
git init

对应的文件中就有.git文件,修改其中的config文件,加上名称,就是你github的名称,以及邮件

3、将文件加入到临时仓库

python 复制代码
git add *

使用git statu可以查看状态

4、提交信息

python 复制代码
git commit -m "stream"

引号中是你写的提交信息

5、连接远程仓库

python 复制代码
git remote add origin https://github.com/seeding-sun/stream-export.git

这里的url就是你新建仓库中的

6、拉取

python 复制代码
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上传文件

相关推荐
u1301302 小时前
GitHub 热榜项目:日榜(2026-10-31)
github
-梅2 小时前
GitHub Actions 自动化:5 个真实运维提效案例
运维·自动化·github
miofly2 小时前
GitHub 周榜趋势速报 | 2026-11-01
开源·github
miofly2 小时前
GitHub 日榜趋势速报 | 2026-11-01
开源·github
Sakura_j_h_11 小时前
EasyEDA PCB 快速设计Skills
c++·python·github
BIBI204913 小时前
换 Git 托管平台怎么做?基于 TortoiseGit 的跨平台迁移教程
windows·git·tortoisegit·问题解决·版本控制·最佳实践
wflynn15 小时前
GitHub 今日推荐|Edge0:让大号 MoE 模型在一台 Mac 上流式跑起来
python·开源·github
用户别睡觉16 小时前
五大 RAG 开源项目对比 2026:Dify、RAGFlow、FastGPT、AnythingLLM、LightRAG
github
用户72737441388416 小时前
在 Windows 11 上从零装好 Carapace BIN:一次真实操作记录
github
miofly17 小时前
Claude Sonnet 5自主选药选坐标完成小鼠脑部手术,更强模型拒绝执行
开源·github