准备工具

可用的IDEA,系统安装好Git

命令: git --version
获取版本号: git version 2.26.0

步骤1:准备github仓库

github上创建仓库
IDEA提交项目至GitHub仓库
在github的右上角,点击加号下方的 New repository --> 在 Repository name 输入框中输入远程仓库名 ---->在Description (optional)输入框中添加对项目的描述 —>然后点击下方的绿色按钮,创建远程仓库完成。
IDEA提交项目至GitHub仓库

步骤2.初始化本地git仓库

在idea中打开Terminal

git初始化本地仓库

在命令行中输入

git init

步骤3.设置.gitignore文件

仅需要上传如下文件:

  • src
  • pom.xml
  • README.MD
  • .gitignore

步骤4.上传github

commit–>push
找到 orgin 和URL 输入 自己github仓库的地址
提交–>push就可以了

相关文章:

  • 2021-11-13
  • 2021-08-12
  • 2021-12-02
  • 2021-09-27
  • 2022-02-03
  • 2019-10-30
  • 2021-12-10
猜你喜欢
  • 2021-08-14
  • 2021-09-29
  • 2021-06-17
  • 2022-01-17
  • 2022-01-09
  • 2021-06-17
  • 2021-08-21
相关资源
相似解决方案