本地项目上传到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
相关推荐
每天吃饭的羊1 分钟前
github上部署自己的静态项目
github
泰勒朗斯35 分钟前
如何在新机器上设置github完成内容git push
git·github
qianmoQ1 小时前
GitHub 趋势日报 (2025年07月05日)
github
weixin_307779132 小时前
批量OCR的GitHub项目
python·github·ocr
前端 贾公子4 小时前
monorepo + Turborepo 缓存
github
独立开阀者_FwtCoder5 小时前
放弃 JSON.parse(JSON.stringify()) 吧!试试现代深拷贝!
前端·javascript·github
网硕互联的小客服5 小时前
如何排查服务器中已经存在的后门程序?
运维·服务器·github
橘黄的猫6 小时前
深入浅出掌握 Git 子模块:项目管理利器
前端·github
独立开阀者_FwtCoder8 小时前
Vite Devtools 要发布了!期待
前端·面试·github
HelloGitHub9 小时前
从被喷“假开源”到登顶 GitHub 热榜,这个开源项目上演王者归来!
开源·github