项目上传到github中

一、创建个springboot项目

二、打开github,创建仓库

三、创建仓库,仓库名可与项目名一样

三、找到项目所在目录,打开git Bush Here

三、依次输入以下命令

git init
git add .
git commit -m "first commit"
下面这两行若已经设置可不输入

git config --global user.email "wu_xie666@163.com"

git config --global user.name "wuzk"
git commit -m "first commit"
git remote add origin https://github.com/wuxie666/wuzk.git
push的时候因为网络问题会多次失败,需要很多次重试,可恶的网络(还好我开了代理)

git push -u origin master

好的,到这里就push成功了,去github上刷新下看看push上的项目

另外,在IDEA中commit和push的时候会要求登录github,可创建个token,登录github,这样就可以正常push代码了,创建token的链接如下:

IDEA使用token登录github_idea github token-CSDN博客

相关推荐
通义灵码19 小时前
Qoder 支持通过 DeepLink 添加 MCP Server
人工智能·github·mcp
数据大魔方1 天前
【期货量化实战】跨期套利策略:价差交易完整指南(TqSdk源码详解)
数据库·python·算法·github·程序员创富
数据大魔方1 天前
【期货量化实战】螺纹钢量化交易指南:品种特性与策略实战(TqSdk完整方案)
python·算法·github·程序员创富·期货程序化·期货量化·交易策略实战
Cx330❀1 天前
Git 多人协作全攻略:从入门到高效协同
大数据·elasticsearch·搜索引擎·gitee·github·全文检索·gitcode
CoderJia程序员甲1 天前
GitHub 热榜项目 - 日榜(2026-1-9)
开源·大模型·llm·github·ai教程
lpfasd1231 天前
系统、详细地介绍 GitHub 官方 API 的能力边界
github
KevinShi_BJ1 天前
Github Copilot 实践
github·copilot
秋雨雁南飞1 天前
图床软件 PicGo + Github
github·picgo·图床
moment&forever1 天前
GitHub 托管 API 地址配置文件:实现零成本云配置托管
github
小龙2 天前
【Git 报错解决】本地无有效提交无法推送(`src refspec main does not match any`)
git·github·报错