1、首先在github网站上新建一个repository

  打开https://github.com/

  找到new repository按钮 输入repository name 选择public

  记录下项目地址:git@github.com:lvlvoutlook/test001.git

2、打开idea 配置git登录信息并 快捷键 ctrl+alt+s

idea git 整合使用

idea git 整合使用

3、新建一个项目test001,项目保存路径d:\\test001

 

4、项目创建成功后再创建一个git项目库

idea git 整合使用

点击 Create Git Repository 之后会提示选择目录,这时一定要选择项目路径也就是(d:\\test001)

5、使用 git shell命令窗口 执行如下命令。注意以下命令要进入d:\\test001中执行。

cd d:
cd test001

git init git add README.md git commit
-m "first commit" git remote add origin git@github.com:lvlvoutlook/test001.git git push -u origin master

完成以上操作以后就可以在idea中push了。

备注:使用git shell 命令必须安装git 客户端,下载址 http://msysgit.github.io/。安装后可以直接在项目目录中右键选择 git bash here。在弹出的窗口中可以直接使用相关命令

相关文章:

  • 2021-12-11
  • 2021-06-03
  • 2021-09-20
  • 2021-06-26
  • 2021-10-08
  • 2021-09-20
  • 2021-08-29
猜你喜欢
  • 2022-12-23
  • 2021-08-24
  • 2021-10-09
  • 2022-01-08
相关资源
相似解决方案