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

相关推荐
徐小夕3 小时前
我们用1万行Vue3代码,做了款开源AI PPT项目
github
苏同学5 小时前
LangGraph 实战:从零实现多工具协作的可追溯文档问答 Agent
github
逛逛GitHub6 小时前
给 OpenClaw 小龙虾🦞搞个像素办公室,这个 GitHub 项目有趣啊。
github
doup智能AI10 小时前
数据分析师:报表自动生成与洞察——AI 员工系列 Vol.4
github
今日无bug10 小时前
Git 提交:用全栈技术打造智能 Commit Message 生成器
git·全栈
答案answer10 小时前
Three.js3D编辑器必备的相机视图插件
开源·github·three.js
明月_清风12 小时前
拒绝盲目 Git:VS Code 神级插件 GitLens 的 9 个进效杀手锏
前端·git
RickeyBoy19 小时前
Git Worktree / Worktrunk:并行 AI 开发工作流实战
github·vibecoding
逛逛GitHub1 天前
55 个 AI Agent 组成虚拟公司开源,2 天就 1 万星
github
Tapir1 天前
被 Karpathy 下场推荐的 NanoClaw 是什么来头
前端·后端·github