本地项目上传到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
相关推荐
阿里嘎多学长7 小时前
2025-12-28 GitHub 热点项目精选
开发语言·程序员·github·代码托管
CoderJia程序员甲7 小时前
GitHub 热榜项目 - 日榜(2025-12-28)
ai·开源·大模型·github·ai教程
一条闲鱼_mytube8 小时前
Github+Jenkins + Harbor CI/CD 指南
ci/cd·github·jenkins
逛逛GitHub9 小时前
国产 OCR 开源神器官网上线了,相当给力。
github
-拟墨画扇-9 小时前
Git | 配置别名操作
git·gitee·github·gitcode
-拟墨画扇-10 小时前
Git | 多人协助策略
git·gitee·github·gitcode
Huazzi.10 小时前
使用Scoop安装Git
git·elasticsearch·gitee·ssh·github·scoop
NocoBase10 小时前
GitHub Star 数量前 12 的 AI 工作流项目
人工智能·低代码·开源·github·无代码
无双@11 小时前
Github BettaFish 微舆docker部署教程 —— 打造你的八卦天团!
docker·容器·开源·github·微舆·bettafish
emem.11 小时前
【超详细】VSCode连接GitHub全攻略:上传/克隆代码一步到位
ide·vscode·github