IntelliJ IDEA 两种连接github repository方式

1.当project已在repository存在时:

  • 添加SSH公钥到github
  • VCS - Git - clone / File - New - Project from Version Control - GitHub,选择对应的Git Repository URL,clone


2.当repository还不存在,即希望将本地已完成的project上传到github repository时: 

  • github创建一个与本地project同名的repository
  • 选中项目根目录
  • 打开VCS - Enable Version Control Intergration,选择Git - OK
  • VCS - Git - remotes添加github repository地址(如https://github.com/Web-Dev-Tutor/nodejs.git) - OK
  • 右键项目根目录或者打开VCS,Git - Add将当前项目文件添加到git, Git - Commit Directory,选择Commit and Push即可

猜你喜欢

转载自blog.csdn.net/qq_33576343/article/details/80883373