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上传文件

相关推荐
明月_清风6 分钟前
面对陌生的 GitHub 项目无从下手?这 4 个网站帮你快速读懂源码
前端·后端·github
SL_staff25 分钟前
Excel如何自动升级为可搜索的知识节点:JVS文档平台的语义解析实践
开源·github·全栈
miofly38 分钟前
GitHub 今日推荐|wordcraft:用 Rust 重写 Word 内核并开放给 AI 调用
rust·开源·github
miofly44 分钟前
Fold:Effect原生多提供商Agent核心框架解读
开源·github
诚小纯1 小时前
跑了 21 次只有 1 次透明:聊聊一个生图 API 的"透明继承"机制
人工智能·github
用户2991422196801 小时前
GitHub 热榜项目:日榜(2026-10-09)
人工智能·开源·github
fundoit1 小时前
为什么需要 Access Token 和 ID Token 两个令牌
java·spring·架构·github·oauth2
逛逛GitHub1 小时前
3 个最近爆火的 Personal Agent ,在 GitHub 上有开源平替了。
github
小猪写代码1 小时前
GitHub 科普
github