本地项目上传到GitHub上(李豆)

本地项目上传到GitHub上(李豆)

  1. 准备工作:

    • 本地需要有 git

    • 也需要有一个 GitHub 账号

  2. 首先需要在 GitHub 新建一个空仓库

  3. 在想要上传项目的文件夹中使用 Git 命令操作

    • 初始化: git init
    • 与 github 仓库进行链接 :git remote add origin 你的ssh地址
    • 添加全部文件到本地仓库:git add . (有个点)
    • 提交文件到本地仓库: git commit -m '第一次提交'
    • 将仓库代码下拉到本地:git pull --rebase origin master
    • 将本地仓库代码提交到 GitHub仓库:git push origin master
相关推荐
dreams_dream8 小时前
项目想要推送多个平台仓库的方法
gitee·github
AI_Lab018 小时前
服务器管理工具要在服务器上装 Agent,安全吗?
服务器·安全·github
七牛云行业应用8 小时前
DeepSeek Harness 插件架构 vs MCP:Cordis 的「Everything is a Plugin」到底解决什么
ai·github·ai编程
u1301309 小时前
GitHub 热榜项目:日榜(2026-10-30)
人工智能·github
AlfredZhao9 小时前
新项目首次提交 GitHub 报错“未配置远端 origin”怎么办
github
miofly9 小时前
GitHub 日榜趋势速报 | 2026-10-31
开源·github
u13013021 小时前
GitHub 热榜项目:日榜(2026-10-29)
人工智能·github
穆梓兰煊1 天前
Python 千万级向量检索内存优化手册
github
用户837133200761 天前
AI总是会忘记细节咋办?我用GitHub实现外部记忆管理
人工智能·github
逛逛GitHub1 天前
这 6 个 GitHub 项目是刚开源,但是 Star 攀升很快的几个。
github