本地项目上传到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
相关推荐
Nejosi_念旧21 分钟前
git报错解决:ssh: connect to host github.com port 22: Connection refused
git·ssh·github
大千AI助手6 小时前
GitHub Copilot:AI编程助手的架构演进与真实世界影响
人工智能·深度学习·大模型·github·copilot·ai编程·codex
xuanerya6 小时前
使用 SSH 方式克隆 GitHub 仓库没有权限解决办法
运维·ssh·github
希尔伯特旅馆11 小时前
Tushare:量化投资数据获取
github
海绵不是宝宝8171 天前
连接远程服务器上的 jupyter notebook,解放本地电脑
服务器·jupyter·github
黑客飓风1 天前
当GitHub宕机时,我们如何协作?
github·notepad++
mit6.8241 天前
[Git] 如何拉取 GitHub 仓库的特定子目录
git·github
用户466537015051 天前
如何在 IntelliJ IDEA 中可视化压缩提交到生产分支
后端·github
用户466537015051 天前
git代码压缩合并
后端·github
若水晴空初如梦1 天前
QT聊天项目DAY19
github